/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
@endpointMap = {
    cn-beijing = 'emr.aliyuncs.com',
    cn-hangzhou = 'emr.aliyuncs.com',
    cn-shanghai = 'emr.aliyuncs.com',
    cn-shenzhen = 'emr.aliyuncs.com',
    ap-southeast-1 = 'emr.aliyuncs.com',
    us-west-1 = 'emr.aliyuncs.com',
    cn-hangzhou-finance = 'emr.aliyuncs.com',
    cn-shenzhen-finance-1 = 'emr.aliyuncs.com',
    cn-shanghai-finance-1 = 'emr.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('emr', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AddClusterServiceRequest {
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  service?: [ 
    {
      serviceName?: string(name='ServiceName'),
      serviceVersion?: string(name='ServiceVersion'),
    }
  ](name='Service'),
}

model AddClusterServiceResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddClusterServiceResponse = {
  headers: map[string]string(name='headers'),
  body: AddClusterServiceResponseBody(name='body'),
}

async function addClusterServiceWithOptions(request: AddClusterServiceRequest, runtime: Util.RuntimeOptions): AddClusterServiceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Service"] = request.service;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'AddClusterService',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addClusterService(request: AddClusterServiceRequest): AddClusterServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addClusterServiceWithOptions(request, runtime);
}

model AddScalingConfigItemV2Request {
  configItemInformation?: string(name='ConfigItemInformation'),
  configItemType?: string(name='ConfigItemType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model AddScalingConfigItemV2ResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model AddScalingConfigItemV2Response = {
  headers: map[string]string(name='headers'),
  body: AddScalingConfigItemV2ResponseBody(name='body'),
}

async function addScalingConfigItemV2WithOptions(request: AddScalingConfigItemV2Request, runtime: Util.RuntimeOptions): AddScalingConfigItemV2Response {
  Util.validateModel(request);
  var query = {};
  query["ConfigItemInformation"] = request.configItemInformation;
  query["ConfigItemType"] = request.configItemType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'AddScalingConfigItemV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addScalingConfigItemV2(request: AddScalingConfigItemV2Request): AddScalingConfigItemV2Response {
  var runtime = new Util.RuntimeOptions{};
  return addScalingConfigItemV2WithOptions(request, runtime);
}

model AuthorizeSecurityGroupRequest {
  bizContent?: string(name='BizContent'),
  bizType?: string(name='BizType'),
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model AuthorizeSecurityGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model AuthorizeSecurityGroupResponse = {
  headers: map[string]string(name='headers'),
  body: AuthorizeSecurityGroupResponseBody(name='body'),
}

async function authorizeSecurityGroupWithOptions(request: AuthorizeSecurityGroupRequest, runtime: Util.RuntimeOptions): AuthorizeSecurityGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["BizContent"] = request.bizContent;
  query["BizType"] = request.bizType;
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeSecurityGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function authorizeSecurityGroup(request: AuthorizeSecurityGroupRequest): AuthorizeSecurityGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return authorizeSecurityGroupWithOptions(request, runtime);
}

model CancelOrderRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CancelOrderResponseBody = {
  requestId?: string(name='RequestId'),
  clusterId?: string(name='clusterId'),
}

model CancelOrderResponse = {
  headers: map[string]string(name='headers'),
  body: CancelOrderResponseBody(name='body'),
}

async function cancelOrderWithOptions(request: CancelOrderRequest, runtime: Util.RuntimeOptions): CancelOrderResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CancelOrder',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelOrder(request: CancelOrderRequest): CancelOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelOrderWithOptions(request, runtime);
}

model CloneFlowRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model CloneFlowResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CloneFlowResponse = {
  headers: map[string]string(name='headers'),
  body: CloneFlowResponseBody(name='body'),
}

async function cloneFlowWithOptions(request: CloneFlowRequest, runtime: Util.RuntimeOptions): CloneFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CloneFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cloneFlow(request: CloneFlowRequest): CloneFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return cloneFlowWithOptions(request, runtime);
}

model CloneFlowJobRequest {
  id?: string(name='Id'),
  name?: string(name='Name'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model CloneFlowJobResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CloneFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: CloneFlowJobResponseBody(name='body'),
}

async function cloneFlowJobWithOptions(request: CloneFlowJobRequest, runtime: Util.RuntimeOptions): CloneFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CloneFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cloneFlowJob(request: CloneFlowJobRequest): CloneFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return cloneFlowJobWithOptions(request, runtime);
}

model CreateBackupRequest {
  backupPlanId?: string(name='BackupPlanId'),
  metadataType?: string(name='MetadataType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CreateBackupResponseBody = {
  bizId?: string(name='BizId'),
  clusterBizId?: string(name='ClusterBizId'),
  dataSourceId?: long(name='DataSourceId'),
  ecmTaskId?: long(name='EcmTaskId'),
  endTime?: long(name='EndTime'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  hostName?: string(name='HostName'),
  requestId?: string(name='RequestId'),
  startTime?: long(name='StartTime'),
  taskDetail?: string(name='TaskDetail'),
  taskProcess?: int32(name='TaskProcess'),
  taskResultDetail?: string(name='TaskResultDetail'),
  taskStatus?: string(name='TaskStatus'),
  taskType?: string(name='TaskType'),
  triggerType?: string(name='TriggerType'),
  triggerUser?: string(name='TriggerUser'),
}

model CreateBackupResponse = {
  headers: map[string]string(name='headers'),
  body: CreateBackupResponseBody(name='body'),
}

async function createBackupWithOptions(request: CreateBackupRequest, runtime: Util.RuntimeOptions): CreateBackupResponse {
  Util.validateModel(request);
  var query = {};
  query["BackupPlanId"] = request.backupPlanId;
  query["MetadataType"] = request.metadataType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateBackup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createBackup(request: CreateBackupRequest): CreateBackupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBackupWithOptions(request, runtime);
}

model CreateBackupPlanRequest {
  clusterId?: string(name='ClusterId'),
  description?: string(name='Description'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  rootPath?: string(name='RootPath'),
}

model CreateBackupPlanResponseBody = {
  clusterId?: string(name='ClusterId'),
  description?: string(name='Description'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  rootPath?: string(name='RootPath'),
}

model CreateBackupPlanResponse = {
  headers: map[string]string(name='headers'),
  body: CreateBackupPlanResponseBody(name='body'),
}

async function createBackupPlanWithOptions(request: CreateBackupPlanRequest, runtime: Util.RuntimeOptions): CreateBackupPlanResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Description"] = request.description;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RootPath"] = request.rootPath;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateBackupPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createBackupPlan(request: CreateBackupPlanRequest): CreateBackupPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return createBackupPlanWithOptions(request, runtime);
}

model CreateClusterBootstrapActionRequest {
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CreateClusterBootstrapActionResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateClusterBootstrapActionResponse = {
  headers: map[string]string(name='headers'),
  body: CreateClusterBootstrapActionResponseBody(name='body'),
}

async function createClusterBootstrapActionWithOptions(request: CreateClusterBootstrapActionRequest, runtime: Util.RuntimeOptions): CreateClusterBootstrapActionResponse {
  Util.validateModel(request);
  var query = {};
  query["BootstrapAction"] = request.bootstrapAction;
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterBootstrapAction',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClusterBootstrapAction(request: CreateClusterBootstrapActionRequest): CreateClusterBootstrapActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterBootstrapActionWithOptions(request, runtime);
}

model CreateClusterHostGroupRequest {
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  hostGroupName?: string(name='HostGroupName'),
  hostGroupParams?: string(name='HostGroupParams'),
  hostGroupType?: string(name='HostGroupType'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  vswitchId?: string(name='VswitchId'),
}

model CreateClusterHostGroupResponseBody = {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterHostGroupResponse = {
  headers: map[string]string(name='headers'),
  body: CreateClusterHostGroupResponseBody(name='body'),
}

async function createClusterHostGroupWithOptions(request: CreateClusterHostGroupRequest, runtime: Util.RuntimeOptions): CreateClusterHostGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["HostGroupName"] = request.hostGroupName;
  query["HostGroupParams"] = request.hostGroupParams;
  query["HostGroupType"] = request.hostGroupType;
  query["PayType"] = request.payType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["VswitchId"] = request.vswitchId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterHostGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClusterHostGroup(request: CreateClusterHostGroupRequest): CreateClusterHostGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterHostGroupWithOptions(request, runtime);
}

model CreateClusterTemplateRequest {
  autoRenew?: boolean(name='AutoRenew'),
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  clientToken?: string(name='ClientToken'),
  clusterType?: string(name='ClusterType'),
  config?: [ 
    {
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      encrypt?: string(name='Encrypt'),
      fileName?: string(name='FileName'),
      replace?: string(name='Replace'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Config'),
  configurations?: string(name='Configurations'),
  depositType?: string(name='DepositType'),
  easEnable?: boolean(name='EasEnable'),
  emrVer?: string(name='EmrVer'),
  highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
  hostGroup?: [ 
    {
      autoRenew?: boolean(name='AutoRenew'),
      chargeType?: string(name='ChargeType'),
      clusterId?: string(name='ClusterId'),
      comment?: string(name='Comment'),
      createType?: string(name='CreateType'),
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostGroupType?: string(name='HostGroupType'),
      instanceType?: string(name='InstanceType'),
      multiInstanceTypes?: string(name='MultiInstanceTypes'),
      nodeCount?: int32(name='NodeCount'),
      period?: int32(name='Period'),
      privatePoolOptionsId?: string(name='PrivatePoolOptionsId'),
      privatePoolOptionsMatchCriteria?: string(name='PrivatePoolOptionsMatchCriteria'),
      sysDiskCapacity?: int32(name='SysDiskCapacity'),
      sysDiskType?: string(name='SysDiskType'),
      vSwitchId?: string(name='VSwitchId'),
    }
  ](name='HostGroup'),
  initCustomHiveMetaDb?: boolean(name='InitCustomHiveMetaDb'),
  instanceGeneration?: string(name='InstanceGeneration'),
  ioOptimized?: boolean(name='IoOptimized'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  keyPairName?: string(name='KeyPairName'),
  logPath?: string(name='LogPath'),
  machineType?: string(name='MachineType'),
  masterPwd?: string(name='MasterPwd'),
  metaStoreConf?: string(name='MetaStoreConf'),
  metaStoreType?: string(name='MetaStoreType'),
  netType?: string(name='NetType'),
  optionSoftWareList?: [ string ](name='OptionSoftWareList'),
  period?: int32(name='Period'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  securityGroupName?: string(name='SecurityGroupName'),
  sshEnable?: boolean(name='SshEnable'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
  templateName?: string(name='TemplateName'),
  useCustomHiveMetaDb?: boolean(name='UseCustomHiveMetaDb'),
  useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
  userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model CreateClusterTemplateResponseBody = {
  clusterTemplateId?: string(name='ClusterTemplateId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: CreateClusterTemplateResponseBody(name='body'),
}

async function createClusterTemplateWithOptions(request: CreateClusterTemplateRequest, runtime: Util.RuntimeOptions): CreateClusterTemplateResponse {
  Util.validateModel(request);
  var query = {};
  query["AutoRenew"] = request.autoRenew;
  query["BootstrapAction"] = request.bootstrapAction;
  query["ClientToken"] = request.clientToken;
  query["ClusterType"] = request.clusterType;
  query["Config"] = request.config;
  query["Configurations"] = request.configurations;
  query["DepositType"] = request.depositType;
  query["EasEnable"] = request.easEnable;
  query["EmrVer"] = request.emrVer;
  query["HighAvailabilityEnable"] = request.highAvailabilityEnable;
  query["HostGroup"] = request.hostGroup;
  query["InitCustomHiveMetaDb"] = request.initCustomHiveMetaDb;
  query["InstanceGeneration"] = request.instanceGeneration;
  query["IoOptimized"] = request.ioOptimized;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["KeyPairName"] = request.keyPairName;
  query["LogPath"] = request.logPath;
  query["MachineType"] = request.machineType;
  query["MasterPwd"] = request.masterPwd;
  query["MetaStoreConf"] = request.metaStoreConf;
  query["MetaStoreType"] = request.metaStoreType;
  query["NetType"] = request.netType;
  query["OptionSoftWareList"] = request.optionSoftWareList;
  query["Period"] = request.period;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["SecurityGroupName"] = request.securityGroupName;
  query["SshEnable"] = request.sshEnable;
  query["Tag"] = request.tag;
  query["TemplateName"] = request.templateName;
  query["UseCustomHiveMetaDb"] = request.useCustomHiveMetaDb;
  query["UseLocalMetaDb"] = request.useLocalMetaDb;
  query["UserDefinedEmrEcsRole"] = request.userDefinedEmrEcsRole;
  query["VSwitchId"] = request.vSwitchId;
  query["VpcId"] = request.vpcId;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterTemplate',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClusterTemplate(request: CreateClusterTemplateRequest): CreateClusterTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterTemplateWithOptions(request, runtime);
}

model CreateClusterV2Request {
  authorizeContent?: string(name='AuthorizeContent'),
  autoPayOrder?: boolean(name='AutoPayOrder'),
  autoRenew?: boolean(name='AutoRenew'),
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  chargeType?: string(name='ChargeType'),
  clickHouseConf?: string(name='ClickHouseConf'),
  clientToken?: string(name='ClientToken'),
  clusterType?: string(name='ClusterType'),
  config?: [ 
    {
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      encrypt?: string(name='Encrypt'),
      fileName?: string(name='FileName'),
      replace?: string(name='Replace'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Config'),
  configurations?: string(name='Configurations'),
  depositType?: string(name='DepositType'),
  easEnable?: boolean(name='EasEnable'),
  emrVer?: string(name='EmrVer'),
  extraAttributes?: string(name='ExtraAttributes'),
  highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
  hostComponentInfo?: [ 
    {
      componentNameList?: [ string ](name='ComponentNameList'),
      hostName?: string(name='HostName'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='HostComponentInfo'),
  hostGroup?: [ 
    {
      autoRenew?: boolean(name='AutoRenew'),
      chargeType?: string(name='ChargeType'),
      clusterId?: string(name='ClusterId'),
      comment?: string(name='Comment'),
      createType?: string(name='CreateType'),
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      gpuDriver?: string(name='GpuDriver'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostGroupType?: string(name='HostGroupType'),
      instanceType?: string(name='InstanceType'),
      nodeCount?: int32(name='NodeCount'),
      period?: int32(name='Period'),
      privatePoolOptionsId?: string(name='PrivatePoolOptionsId'),
      privatePoolOptionsMatchCriteria?: string(name='PrivatePoolOptionsMatchCriteria'),
      sysDiskCapacity?: int32(name='SysDiskCapacity'),
      sysDiskType?: string(name='SysDiskType'),
      vSwitchId?: string(name='VSwitchId'),
    }
  ](name='HostGroup'),
  initCustomHiveMetaDB?: boolean(name='InitCustomHiveMetaDB'),
  instanceGeneration?: string(name='InstanceGeneration'),
  ioOptimized?: boolean(name='IoOptimized'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  keyPairName?: string(name='KeyPairName'),
  logPath?: string(name='LogPath'),
  machineType?: string(name='MachineType'),
  masterPwd?: string(name='MasterPwd'),
  metaStoreConf?: string(name='MetaStoreConf'),
  metaStoreType?: string(name='MetaStoreType'),
  name?: string(name='Name'),
  netType?: string(name='NetType'),
  optionSoftWareList?: [ string ](name='OptionSoftWareList'),
  period?: int32(name='Period'),
  promotionInfo?: [ 
    {
      productCode?: string(name='ProductCode'),
      promotionOptionCode?: string(name='PromotionOptionCode'),
      promotionOptionNo?: string(name='PromotionOptionNo'),
    }
  ](name='PromotionInfo'),
  regionId?: string(name='RegionId'),
  relatedClusterId?: string(name='RelatedClusterId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  securityGroupName?: string(name='SecurityGroupName'),
  serviceInfo?: [ 
    {
      serviceName?: string(name='ServiceName'),
      serviceVersion?: string(name='ServiceVersion'),
    }
  ](name='ServiceInfo'),
  sshEnable?: boolean(name='SshEnable'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
  useCustomHiveMetaDB?: boolean(name='UseCustomHiveMetaDB'),
  useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
  userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
  userInfo?: [ 
    {
      password?: string(name='Password'),
      userId?: string(name='UserId'),
      userName?: string(name='UserName'),
    }
  ](name='UserInfo'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  whiteListType?: string(name='WhiteListType'),
  zoneId?: string(name='ZoneId'),
}

model CreateClusterV2ResponseBody = {
  clusterId?: string(name='ClusterId'),
  coreOrderId?: string(name='CoreOrderId'),
  emrOrderId?: string(name='EmrOrderId'),
  masterOrderId?: string(name='MasterOrderId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterV2Response = {
  headers: map[string]string(name='headers'),
  body: CreateClusterV2ResponseBody(name='body'),
}

async function createClusterV2WithOptions(request: CreateClusterV2Request, runtime: Util.RuntimeOptions): CreateClusterV2Response {
  Util.validateModel(request);
  var query = {};
  query["AuthorizeContent"] = request.authorizeContent;
  query["AutoPayOrder"] = request.autoPayOrder;
  query["AutoRenew"] = request.autoRenew;
  query["BootstrapAction"] = request.bootstrapAction;
  query["ChargeType"] = request.chargeType;
  query["ClickHouseConf"] = request.clickHouseConf;
  query["ClientToken"] = request.clientToken;
  query["ClusterType"] = request.clusterType;
  query["Config"] = request.config;
  query["Configurations"] = request.configurations;
  query["DepositType"] = request.depositType;
  query["EasEnable"] = request.easEnable;
  query["EmrVer"] = request.emrVer;
  query["ExtraAttributes"] = request.extraAttributes;
  query["HighAvailabilityEnable"] = request.highAvailabilityEnable;
  query["HostComponentInfo"] = request.hostComponentInfo;
  query["HostGroup"] = request.hostGroup;
  query["InitCustomHiveMetaDB"] = request.initCustomHiveMetaDB;
  query["InstanceGeneration"] = request.instanceGeneration;
  query["IoOptimized"] = request.ioOptimized;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["KeyPairName"] = request.keyPairName;
  query["LogPath"] = request.logPath;
  query["MachineType"] = request.machineType;
  query["MasterPwd"] = request.masterPwd;
  query["MetaStoreConf"] = request.metaStoreConf;
  query["MetaStoreType"] = request.metaStoreType;
  query["Name"] = request.name;
  query["NetType"] = request.netType;
  query["OptionSoftWareList"] = request.optionSoftWareList;
  query["Period"] = request.period;
  query["PromotionInfo"] = request.promotionInfo;
  query["RegionId"] = request.regionId;
  query["RelatedClusterId"] = request.relatedClusterId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["SecurityGroupName"] = request.securityGroupName;
  query["ServiceInfo"] = request.serviceInfo;
  query["SshEnable"] = request.sshEnable;
  query["Tag"] = request.tag;
  query["UseCustomHiveMetaDB"] = request.useCustomHiveMetaDB;
  query["UseLocalMetaDb"] = request.useLocalMetaDb;
  query["UserDefinedEmrEcsRole"] = request.userDefinedEmrEcsRole;
  query["UserInfo"] = request.userInfo;
  query["VSwitchId"] = request.vSwitchId;
  query["VpcId"] = request.vpcId;
  query["WhiteListType"] = request.whiteListType;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClusterV2(request: CreateClusterV2Request): CreateClusterV2Response {
  var runtime = new Util.RuntimeOptions{};
  return createClusterV2WithOptions(request, runtime);
}

model CreateClusterWithTemplateRequest {
  clusterName?: string(name='ClusterName'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  templateBizId?: string(name='TemplateBizId'),
  uniqueTag?: string(name='UniqueTag'),
}

model CreateClusterWithTemplateResponseBody = {
  clusterId?: string(name='ClusterId'),
  coreOrderId?: string(name='CoreOrderId'),
  emrOrderId?: string(name='EmrOrderId'),
  masterOrderId?: string(name='MasterOrderId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterWithTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: CreateClusterWithTemplateResponseBody(name='body'),
}

async function createClusterWithTemplateWithOptions(request: CreateClusterWithTemplateRequest, runtime: Util.RuntimeOptions): CreateClusterWithTemplateResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterName"] = request.clusterName;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TemplateBizId"] = request.templateBizId;
  query["UniqueTag"] = request.uniqueTag;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterWithTemplate',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClusterWithTemplate(request: CreateClusterWithTemplateRequest): CreateClusterWithTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithTemplateWithOptions(request, runtime);
}

model CreateDataSourceRequest {
  clusterId?: string(name='ClusterId'),
  conf?: string(name='Conf'),
  description?: string(name='Description'),
  name?: string(name='Name'),
  navParentId?: string(name='NavParentId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sourceType?: string(name='SourceType'),
}

model CreateDataSourceResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateDataSourceResponse = {
  headers: map[string]string(name='headers'),
  body: CreateDataSourceResponseBody(name='body'),
}

async function createDataSourceWithOptions(request: CreateDataSourceRequest, runtime: Util.RuntimeOptions): CreateDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Conf"] = request.conf;
  query["Description"] = request.description;
  query["Name"] = request.name;
  query["NavParentId"] = request.navParentId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SourceType"] = request.sourceType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateDataSource',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDataSource(request: CreateDataSourceRequest): CreateDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDataSourceWithOptions(request, runtime);
}

model CreateExecutionPlanRequest {
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  clusterType?: string(name='ClusterType'),
  config?: [ 
    {
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      encrypt?: string(name='Encrypt'),
      fileName?: string(name='FileName'),
      replace?: string(name='Replace'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Config'),
  configurations?: string(name='Configurations'),
  createClusterOnDemand?: boolean(name='CreateClusterOnDemand'),
  dayOfMonth?: string(name='DayOfMonth'),
  dayOfWeek?: string(name='DayOfWeek'),
  easEnable?: boolean(name='EasEnable'),
  ecsOrder?: [ 
    {
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      index?: int32(name='Index'),
      instanceType?: string(name='InstanceType'),
      nodeCount?: int32(name='NodeCount'),
      nodeType?: string(name='NodeType'),
    }
  ](name='EcsOrder'),
  emrVer?: string(name='EmrVer'),
  highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
  initCustomHiveMetaDB?: boolean(name='InitCustomHiveMetaDB'),
  instanceGeneration?: string(name='InstanceGeneration'),
  ioOptimized?: boolean(name='IoOptimized'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  jobIdList?: [ string ](name='JobIdList'),
  logEnable?: boolean(name='LogEnable'),
  logPath?: string(name='LogPath'),
  name?: string(name='Name'),
  netType?: string(name='NetType'),
  optionSoftWareList?: [ string ](name='OptionSoftWareList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  startTime?: long(name='StartTime'),
  strategy?: string(name='Strategy'),
  timeInterval?: int32(name='TimeInterval'),
  timeUnit?: string(name='TimeUnit'),
  useCustomHiveMetaDB?: boolean(name='UseCustomHiveMetaDB'),
  useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
  userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  workflowDefinition?: string(name='WorkflowDefinition'),
  zoneId?: string(name='ZoneId'),
}

model CreateExecutionPlanResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateExecutionPlanResponse = {
  headers: map[string]string(name='headers'),
  body: CreateExecutionPlanResponseBody(name='body'),
}

async function createExecutionPlanWithOptions(request: CreateExecutionPlanRequest, runtime: Util.RuntimeOptions): CreateExecutionPlanResponse {
  Util.validateModel(request);
  var query = {};
  query["BootstrapAction"] = request.bootstrapAction;
  query["ClusterId"] = request.clusterId;
  query["ClusterName"] = request.clusterName;
  query["ClusterType"] = request.clusterType;
  query["Config"] = request.config;
  query["Configurations"] = request.configurations;
  query["CreateClusterOnDemand"] = request.createClusterOnDemand;
  query["DayOfMonth"] = request.dayOfMonth;
  query["DayOfWeek"] = request.dayOfWeek;
  query["EasEnable"] = request.easEnable;
  query["EcsOrder"] = request.ecsOrder;
  query["EmrVer"] = request.emrVer;
  query["HighAvailabilityEnable"] = request.highAvailabilityEnable;
  query["InitCustomHiveMetaDB"] = request.initCustomHiveMetaDB;
  query["InstanceGeneration"] = request.instanceGeneration;
  query["IoOptimized"] = request.ioOptimized;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["JobIdList"] = request.jobIdList;
  query["LogEnable"] = request.logEnable;
  query["LogPath"] = request.logPath;
  query["Name"] = request.name;
  query["NetType"] = request.netType;
  query["OptionSoftWareList"] = request.optionSoftWareList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["StartTime"] = request.startTime;
  query["Strategy"] = request.strategy;
  query["TimeInterval"] = request.timeInterval;
  query["TimeUnit"] = request.timeUnit;
  query["UseCustomHiveMetaDB"] = request.useCustomHiveMetaDB;
  query["UseLocalMetaDb"] = request.useLocalMetaDb;
  query["UserDefinedEmrEcsRole"] = request.userDefinedEmrEcsRole;
  query["VSwitchId"] = request.vSwitchId;
  query["VpcId"] = request.vpcId;
  query["WorkflowDefinition"] = request.workflowDefinition;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateExecutionPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createExecutionPlan(request: CreateExecutionPlanRequest): CreateExecutionPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return createExecutionPlanWithOptions(request, runtime);
}

model CreateFlowRequest {
  alertConf?: string(name='AlertConf'),
  alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
  alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
  application?: string(name='Application'),
  clusterId?: string(name='ClusterId'),
  createCluster?: boolean(name='CreateCluster'),
  cronExpr?: string(name='CronExpr'),
  description?: string(name='Description'),
  endSchedule?: long(name='EndSchedule'),
  hostName?: string(name='HostName'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  name?: string(name='Name'),
  namespace?: string(name='Namespace'),
  parentCategory?: string(name='ParentCategory'),
  parentFlowList?: string(name='ParentFlowList'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  startSchedule?: long(name='StartSchedule'),
}

model CreateFlowResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateFlowResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowResponseBody(name='body'),
}

async function createFlowWithOptions(request: CreateFlowRequest, runtime: Util.RuntimeOptions): CreateFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["AlertConf"] = request.alertConf;
  query["AlertDingDingGroupBizId"] = request.alertDingDingGroupBizId;
  query["AlertUserGroupBizId"] = request.alertUserGroupBizId;
  query["Application"] = request.application;
  query["ClusterId"] = request.clusterId;
  query["CreateCluster"] = request.createCluster;
  query["CronExpr"] = request.cronExpr;
  query["Description"] = request.description;
  query["EndSchedule"] = request.endSchedule;
  query["HostName"] = request.hostName;
  query["Lifecycle"] = request.lifecycle;
  query["LogArchiveLocation"] = request.logArchiveLocation;
  query["Name"] = request.name;
  query["Namespace"] = request.namespace;
  query["ParentCategory"] = request.parentCategory;
  query["ParentFlowList"] = request.parentFlowList;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StartSchedule"] = request.startSchedule;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlow(request: CreateFlowRequest): CreateFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowWithOptions(request, runtime);
}

model CreateFlowCategoryRequest {
  name?: string(name='Name'),
  parentId?: string(name='ParentId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  type?: string(name='Type'),
}

model CreateFlowCategoryResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateFlowCategoryResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowCategoryResponseBody(name='body'),
}

async function createFlowCategoryWithOptions(request: CreateFlowCategoryRequest, runtime: Util.RuntimeOptions): CreateFlowCategoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Name"] = request.name;
  query["ParentId"] = request.parentId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowCategory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowCategory(request: CreateFlowCategoryRequest): CreateFlowCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowCategoryWithOptions(request, runtime);
}

model CreateFlowForWebRequest {
  alertConf?: string(name='AlertConf'),
  alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
  alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
  clusterId?: string(name='ClusterId'),
  createCluster?: boolean(name='CreateCluster'),
  cronExpr?: string(name='CronExpr'),
  description?: string(name='Description'),
  endSchedule?: long(name='EndSchedule'),
  graph?: string(name='Graph'),
  hostName?: string(name='HostName'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  name?: string(name='Name'),
  namespace?: string(name='Namespace'),
  parentCategory?: string(name='ParentCategory'),
  parentFlowList?: string(name='ParentFlowList'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  startSchedule?: long(name='StartSchedule'),
}

model CreateFlowForWebResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateFlowForWebResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowForWebResponseBody(name='body'),
}

async function createFlowForWebWithOptions(request: CreateFlowForWebRequest, runtime: Util.RuntimeOptions): CreateFlowForWebResponse {
  Util.validateModel(request);
  var query = {};
  query["AlertConf"] = request.alertConf;
  query["AlertDingDingGroupBizId"] = request.alertDingDingGroupBizId;
  query["AlertUserGroupBizId"] = request.alertUserGroupBizId;
  query["ClusterId"] = request.clusterId;
  query["CreateCluster"] = request.createCluster;
  query["CronExpr"] = request.cronExpr;
  query["Description"] = request.description;
  query["EndSchedule"] = request.endSchedule;
  query["Graph"] = request.graph;
  query["HostName"] = request.hostName;
  query["Lifecycle"] = request.lifecycle;
  query["LogArchiveLocation"] = request.logArchiveLocation;
  query["Name"] = request.name;
  query["Namespace"] = request.namespace;
  query["ParentCategory"] = request.parentCategory;
  query["ParentFlowList"] = request.parentFlowList;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StartSchedule"] = request.startSchedule;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowForWeb',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowForWeb(request: CreateFlowForWebRequest): CreateFlowForWebResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowForWebWithOptions(request, runtime);
}

model CreateFlowJobRequest {
  adhoc?: boolean(name='Adhoc'),
  alertConf?: string(name='AlertConf'),
  clusterId?: string(name='ClusterId'),
  customVariables?: string(name='CustomVariables'),
  description?: string(name='Description'),
  envConf?: string(name='EnvConf'),
  failAct?: string(name='FailAct'),
  maxRetry?: int32(name='MaxRetry'),
  maxRunningTimeSec?: long(name='MaxRunningTimeSec'),
  mode?: string(name='Mode'),
  monitorConf?: string(name='MonitorConf'),
  name?: string(name='Name'),
  paramConf?: string(name='ParamConf'),
  params?: string(name='Params'),
  parentCategory?: string(name='ParentCategory'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceList?: [ 
    {
      alias?: string(name='Alias'),
      path?: string(name='Path'),
    }
  ](name='ResourceList'),
  retryInterval?: long(name='RetryInterval'),
  retryPolicy?: string(name='RetryPolicy'),
  runConf?: string(name='RunConf'),
  type?: string(name='Type'),
}

model CreateFlowJobResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowJobResponseBody(name='body'),
}

async function createFlowJobWithOptions(request: CreateFlowJobRequest, runtime: Util.RuntimeOptions): CreateFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Adhoc"] = request.adhoc;
  query["AlertConf"] = request.alertConf;
  query["ClusterId"] = request.clusterId;
  query["FailAct"] = request.failAct;
  query["MaxRetry"] = request.maxRetry;
  query["MaxRunningTimeSec"] = request.maxRunningTimeSec;
  query["Mode"] = request.mode;
  query["Name"] = request.name;
  query["ParentCategory"] = request.parentCategory;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["RetryInterval"] = request.retryInterval;
  query["RetryPolicy"] = request.retryPolicy;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowJob(request: CreateFlowJobRequest): CreateFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowJobWithOptions(request, runtime);
}

model CreateFlowProjectRequest {
  description?: string(name='Description'),
  name?: string(name='Name'),
  productType?: string(name='ProductType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model CreateFlowProjectResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateFlowProjectResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowProjectResponseBody(name='body'),
}

async function createFlowProjectWithOptions(request: CreateFlowProjectRequest, runtime: Util.RuntimeOptions): CreateFlowProjectResponse {
  Util.validateModel(request);
  var query = {};
  query["Description"] = request.description;
  query["Name"] = request.name;
  query["ProductType"] = request.productType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowProject',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowProject(request: CreateFlowProjectRequest): CreateFlowProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowProjectWithOptions(request, runtime);
}

model CreateFlowProjectClusterSettingRequest {
  clusterId?: string(name='ClusterId'),
  defaultQueue?: string(name='DefaultQueue'),
  defaultUser?: string(name='DefaultUser'),
  hostList?: [ string ](name='HostList'),
  projectId?: string(name='ProjectId'),
  queueList?: [ string ](name='QueueList'),
  regionId?: string(name='RegionId'),
  userList?: [ string ](name='UserList'),
}

model CreateFlowProjectClusterSettingResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateFlowProjectClusterSettingResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowProjectClusterSettingResponseBody(name='body'),
}

async function createFlowProjectClusterSettingWithOptions(request: CreateFlowProjectClusterSettingRequest, runtime: Util.RuntimeOptions): CreateFlowProjectClusterSettingResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["DefaultQueue"] = request.defaultQueue;
  query["DefaultUser"] = request.defaultUser;
  query["HostList"] = request.hostList;
  query["ProjectId"] = request.projectId;
  query["QueueList"] = request.queueList;
  query["RegionId"] = request.regionId;
  query["UserList"] = request.userList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowProjectClusterSetting',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowProjectClusterSetting(request: CreateFlowProjectClusterSettingRequest): CreateFlowProjectClusterSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowProjectClusterSettingWithOptions(request, runtime);
}

model CreateFlowProjectUserRequest {
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  user?: [ 
    {
      userId?: string(name='UserId'),
      userName?: string(name='UserName'),
    }
  ](name='User'),
}

model CreateFlowProjectUserResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateFlowProjectUserResponse = {
  headers: map[string]string(name='headers'),
  body: CreateFlowProjectUserResponseBody(name='body'),
}

async function createFlowProjectUserWithOptions(request: CreateFlowProjectUserRequest, runtime: Util.RuntimeOptions): CreateFlowProjectUserResponse {
  Util.validateModel(request);
  var query = {};
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["User"] = request.user;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateFlowProjectUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createFlowProjectUser(request: CreateFlowProjectUserRequest): CreateFlowProjectUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return createFlowProjectUserWithOptions(request, runtime);
}

model CreateJobRequest {
  failAct?: string(name='FailAct'),
  maxRetry?: int32(name='MaxRetry'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  retryInterval?: int32(name='RetryInterval'),
  runParameter?: string(name='RunParameter'),
  type?: string(name='Type'),
}

model CreateJobResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model CreateJobResponse = {
  headers: map[string]string(name='headers'),
  body: CreateJobResponseBody(name='body'),
}

async function createJobWithOptions(request: CreateJobRequest, runtime: Util.RuntimeOptions): CreateJobResponse {
  Util.validateModel(request);
  var query = {};
  query["FailAct"] = request.failAct;
  query["MaxRetry"] = request.maxRetry;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RetryInterval"] = request.retryInterval;
  query["RunParameter"] = request.runParameter;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createJob(request: CreateJobRequest): CreateJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return createJobWithOptions(request, runtime);
}

model CreateLibraryRequest {
  libraryVersion?: string(name='LibraryVersion'),
  name?: string(name='Name'),
  properties?: string(name='Properties'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scope?: string(name='Scope'),
  sourceLocation?: string(name='SourceLocation'),
  sourceType?: string(name='SourceType'),
  type?: string(name='Type'),
}

model CreateLibraryResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateLibraryResponse = {
  headers: map[string]string(name='headers'),
  body: CreateLibraryResponseBody(name='body'),
}

async function createLibraryWithOptions(request: CreateLibraryRequest, runtime: Util.RuntimeOptions): CreateLibraryResponse {
  Util.validateModel(request);
  var query = {};
  query["LibraryVersion"] = request.libraryVersion;
  query["Name"] = request.name;
  query["Properties"] = request.properties;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Scope"] = request.scope;
  query["SourceLocation"] = request.sourceLocation;
  query["SourceType"] = request.sourceType;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateLibrary',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLibrary(request: CreateLibraryRequest): CreateLibraryResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLibraryWithOptions(request, runtime);
}

model CreateMetaTablePreviewTaskRequest {
  clusterId?: string(name='ClusterId'),
  databaseId?: string(name='DatabaseId'),
  password?: string(name='Password'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tableId?: string(name='TableId'),
  user?: string(name='User'),
}

model CreateMetaTablePreviewTaskResponseBody = {
  requestId?: string(name='RequestId'),
  taskId?: string(name='TaskId'),
}

model CreateMetaTablePreviewTaskResponse = {
  headers: map[string]string(name='headers'),
  body: CreateMetaTablePreviewTaskResponseBody(name='body'),
}

async function createMetaTablePreviewTaskWithOptions(request: CreateMetaTablePreviewTaskRequest, runtime: Util.RuntimeOptions): CreateMetaTablePreviewTaskResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["DatabaseId"] = request.databaseId;
  query["Password"] = request.password;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TableId"] = request.tableId;
  query["User"] = request.user;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateMetaTablePreviewTask',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMetaTablePreviewTask(request: CreateMetaTablePreviewTaskRequest): CreateMetaTablePreviewTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMetaTablePreviewTaskWithOptions(request, runtime);
}

model CreateResourcePoolRequest {
  active?: boolean(name='Active'),
  clusterId?: string(name='ClusterId'),
  config?: [ 
    {
      category?: string(name='Category'),
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      note?: string(name='Note'),
      targetId?: string(name='TargetId'),
      configType?: string(name='configType'),
    }
  ](name='Config'),
  name?: string(name='Name'),
  note?: string(name='Note'),
  poolType?: string(name='PoolType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  yarnSiteConfig?: string(name='YarnSiteConfig'),
}

model CreateResourcePoolResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateResourcePoolResponse = {
  headers: map[string]string(name='headers'),
  body: CreateResourcePoolResponseBody(name='body'),
}

async function createResourcePoolWithOptions(request: CreateResourcePoolRequest, runtime: Util.RuntimeOptions): CreateResourcePoolResponse {
  Util.validateModel(request);
  var query = {};
  query["Active"] = request.active;
  query["ClusterId"] = request.clusterId;
  query["Config"] = request.config;
  query["Name"] = request.name;
  query["Note"] = request.note;
  query["PoolType"] = request.poolType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["YarnSiteConfig"] = request.yarnSiteConfig;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateResourcePool',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createResourcePool(request: CreateResourcePoolRequest): CreateResourcePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return createResourcePoolWithOptions(request, runtime);
}

model CreateResourceQueueRequest {
  clusterId?: string(name='ClusterId'),
  config?: [ 
    {
      category?: string(name='Category'),
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      note?: string(name='Note'),
    }
  ](name='Config'),
  leaf?: boolean(name='Leaf'),
  name?: string(name='Name'),
  parentQueueId?: long(name='ParentQueueId'),
  qualifiedName?: string(name='QualifiedName'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourcePoolId?: long(name='ResourcePoolId'),
}

model CreateResourceQueueResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateResourceQueueResponse = {
  headers: map[string]string(name='headers'),
  body: CreateResourceQueueResponseBody(name='body'),
}

async function createResourceQueueWithOptions(request: CreateResourceQueueRequest, runtime: Util.RuntimeOptions): CreateResourceQueueResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Config"] = request.config;
  query["Leaf"] = request.leaf;
  query["Name"] = request.name;
  query["ParentQueueId"] = request.parentQueueId;
  query["QualifiedName"] = request.qualifiedName;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourcePoolId"] = request.resourcePoolId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateResourceQueue',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createResourceQueue(request: CreateResourceQueueRequest): CreateResourceQueueResponse {
  var runtime = new Util.RuntimeOptions{};
  return createResourceQueueWithOptions(request, runtime);
}

model CreateScalingGroupV2Request {
  description?: string(name='Description'),
  hostGroupId?: string(name='HostGroupId'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CreateScalingGroupV2ResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateScalingGroupV2Response = {
  headers: map[string]string(name='headers'),
  body: CreateScalingGroupV2ResponseBody(name='body'),
}

async function createScalingGroupV2WithOptions(request: CreateScalingGroupV2Request, runtime: Util.RuntimeOptions): CreateScalingGroupV2Response {
  Util.validateModel(request);
  var query = {};
  query["Description"] = request.description;
  query["HostGroupId"] = request.hostGroupId;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateScalingGroupV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createScalingGroupV2(request: CreateScalingGroupV2Request): CreateScalingGroupV2Response {
  var runtime = new Util.RuntimeOptions{};
  return createScalingGroupV2WithOptions(request, runtime);
}

model CreateScalingRuleRequest {
  adjustmentType?: string(name='AdjustmentType'),
  adjustmentValue?: int32(name='AdjustmentValue'),
  cloudWatchTrigger?: [ 
    {
      comparisonOperator?: string(name='ComparisonOperator'),
      evaluationCount?: string(name='EvaluationCount'),
      metricName?: string(name='MetricName'),
      period?: int32(name='Period'),
      statistics?: string(name='Statistics'),
      threshold?: string(name='Threshold'),
    }
  ](name='CloudWatchTrigger'),
  clusterId?: string(name='ClusterId'),
  cooldown?: int32(name='Cooldown'),
  hostGroupId?: string(name='HostGroupId'),
  launchExpirationTime?: int32(name='LaunchExpirationTime'),
  launchTime?: string(name='LaunchTime'),
  recurrenceEndTime?: string(name='RecurrenceEndTime'),
  recurrenceType?: string(name='RecurrenceType'),
  recurrenceValue?: string(name='RecurrenceValue'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleCategory?: string(name='RuleCategory'),
  ruleName?: string(name='RuleName'),
  schedulerTrigger?: [ 
    {
      launchExpirationTime?: int32(name='LaunchExpirationTime'),
      launchTime?: string(name='LaunchTime'),
      recurrenceEndTime?: string(name='RecurrenceEndTime'),
      recurrenceType?: string(name='RecurrenceType'),
      recurrenceValue?: string(name='RecurrenceValue'),
    }
  ](name='SchedulerTrigger'),
  timeoutWithGrace?: long(name='TimeoutWithGrace'),
  withGrace?: boolean(name='WithGrace'),
}

model CreateScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
  scalingRuleId?: string(name='ScalingRuleId'),
}

model CreateScalingRuleResponse = {
  headers: map[string]string(name='headers'),
  body: CreateScalingRuleResponseBody(name='body'),
}

async function createScalingRuleWithOptions(request: CreateScalingRuleRequest, runtime: Util.RuntimeOptions): CreateScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  query["AdjustmentType"] = request.adjustmentType;
  query["AdjustmentValue"] = request.adjustmentValue;
  query["CloudWatchTrigger"] = request.cloudWatchTrigger;
  query["ClusterId"] = request.clusterId;
  query["Cooldown"] = request.cooldown;
  query["HostGroupId"] = request.hostGroupId;
  query["LaunchExpirationTime"] = request.launchExpirationTime;
  query["LaunchTime"] = request.launchTime;
  query["RecurrenceEndTime"] = request.recurrenceEndTime;
  query["RecurrenceType"] = request.recurrenceType;
  query["RecurrenceValue"] = request.recurrenceValue;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RuleCategory"] = request.ruleCategory;
  query["RuleName"] = request.ruleName;
  query["SchedulerTrigger"] = request.schedulerTrigger;
  query["TimeoutWithGrace"] = request.timeoutWithGrace;
  query["WithGrace"] = request.withGrace;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateScalingRule',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createScalingRule(request: CreateScalingRuleRequest): CreateScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScalingRuleWithOptions(request, runtime);
}

model CreateTagRequest {
  category?: string(name='Category'),
  description?: string(name='Description'),
  id?: long(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model CreateTagResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model CreateTagResponse = {
  headers: map[string]string(name='headers'),
  body: CreateTagResponseBody(name='body'),
}

async function createTagWithOptions(request: CreateTagRequest, runtime: Util.RuntimeOptions): CreateTagResponse {
  Util.validateModel(request);
  var query = {};
  query["Category"] = request.category;
  query["Description"] = request.description;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateTag',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createTag(request: CreateTagRequest): CreateTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTagWithOptions(request, runtime);
}

model CreateUserRequest {
  aliyunUserId?: string(name='AliyunUserId'),
  description?: string(name='Description'),
  groupIdList?: [ integer ](name='GroupIdList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  roleIdList?: [ integer ](name='RoleIdList'),
  status?: string(name='Status'),
  userAccountParamList?: [ 
    {
      accountPassword?: string(name='AccountPassword'),
      accountType?: string(name='AccountType'),
      authType?: string(name='AuthType'),
    }
  ](name='UserAccountParamList'),
  userName?: string(name='UserName'),
  userType?: string(name='UserType'),
}

model CreateUserResponseBody = {
  data?: boolean(name='Data'),
  paging?: boolean(name='Paging'),
  requestId?: string(name='RequestId'),
}

model CreateUserResponse = {
  headers: map[string]string(name='headers'),
  body: CreateUserResponseBody(name='body'),
}

async function createUserWithOptions(request: CreateUserRequest, runtime: Util.RuntimeOptions): CreateUserResponse {
  Util.validateModel(request);
  var query = {};
  query["AliyunUserId"] = request.aliyunUserId;
  query["Description"] = request.description;
  query["GroupIdList"] = request.groupIdList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RoleIdList"] = request.roleIdList;
  query["Status"] = request.status;
  query["UserAccountParamList"] = request.userAccountParamList;
  query["UserName"] = request.userName;
  query["UserType"] = request.userType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createUser(request: CreateUserRequest): CreateUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUserWithOptions(request, runtime);
}

model CreateUsersRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  userInfo?: [ 
    {
      type?: string(name='Type'),
      userId?: string(name='UserId'),
      userName?: string(name='UserName'),
    }
  ](name='UserInfo'),
}

model CreateUsersResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateUsersResponse = {
  headers: map[string]string(name='headers'),
  body: CreateUsersResponseBody(name='body'),
}

async function createUsersWithOptions(request: CreateUsersRequest, runtime: Util.RuntimeOptions): CreateUsersResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["UserInfo"] = request.userInfo;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'CreateUsers',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createUsers(request: CreateUsersRequest): CreateUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUsersWithOptions(request, runtime);
}

model DecommissionHostComponentRequest {
  clusterId?: string(name='ClusterId'),
  componentName?: string(name='ComponentName'),
  hostInstanceId?: string(name='HostInstanceId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
  timeoutSeconds?: long(name='TimeoutSeconds'),
}

model DecommissionHostComponentResponseBody = {
  requestId?: string(name='RequestId'),
}

model DecommissionHostComponentResponse = {
  headers: map[string]string(name='headers'),
  body: DecommissionHostComponentResponseBody(name='body'),
}

async function decommissionHostComponentWithOptions(request: DecommissionHostComponentRequest, runtime: Util.RuntimeOptions): DecommissionHostComponentResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ComponentName"] = request.componentName;
  query["HostInstanceId"] = request.hostInstanceId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  query["TimeoutSeconds"] = request.timeoutSeconds;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DecommissionHostComponent',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function decommissionHostComponent(request: DecommissionHostComponentRequest): DecommissionHostComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return decommissionHostComponentWithOptions(request, runtime);
}

model DeleteClusterTemplateRequest {
  bizId?: string(name='BizId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteClusterTemplateResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteClusterTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteClusterTemplateResponseBody(name='body'),
}

async function deleteClusterTemplateWithOptions(request: DeleteClusterTemplateRequest, runtime: Util.RuntimeOptions): DeleteClusterTemplateResponse {
  Util.validateModel(request);
  var query = {};
  query["BizId"] = request.bizId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClusterTemplate',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteClusterTemplate(request: DeleteClusterTemplateRequest): DeleteClusterTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterTemplateWithOptions(request, runtime);
}

model DeleteExecutionPlanRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteExecutionPlanResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteExecutionPlanResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteExecutionPlanResponseBody(name='body'),
}

async function deleteExecutionPlanWithOptions(request: DeleteExecutionPlanRequest, runtime: Util.RuntimeOptions): DeleteExecutionPlanResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteExecutionPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteExecutionPlan(request: DeleteExecutionPlanRequest): DeleteExecutionPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteExecutionPlanWithOptions(request, runtime);
}

model DeleteFlowRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DeleteFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowResponseBody(name='body'),
}

async function deleteFlowWithOptions(request: DeleteFlowRequest, runtime: Util.RuntimeOptions): DeleteFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlow(request: DeleteFlowRequest): DeleteFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowWithOptions(request, runtime);
}

model DeleteFlowCategoryRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DeleteFlowCategoryResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowCategoryResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowCategoryResponseBody(name='body'),
}

async function deleteFlowCategoryWithOptions(request: DeleteFlowCategoryRequest, runtime: Util.RuntimeOptions): DeleteFlowCategoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlowCategory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlowCategory(request: DeleteFlowCategoryRequest): DeleteFlowCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowCategoryWithOptions(request, runtime);
}

model DeleteFlowJobRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DeleteFlowJobResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowJobResponseBody(name='body'),
}

async function deleteFlowJobWithOptions(request: DeleteFlowJobRequest, runtime: Util.RuntimeOptions): DeleteFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlowJob(request: DeleteFlowJobRequest): DeleteFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowJobWithOptions(request, runtime);
}

model DeleteFlowProjectRequest {
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DeleteFlowProjectResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowProjectResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowProjectResponseBody(name='body'),
}

async function deleteFlowProjectWithOptions(request: DeleteFlowProjectRequest, runtime: Util.RuntimeOptions): DeleteFlowProjectResponse {
  Util.validateModel(request);
  var query = {};
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlowProject',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlowProject(request: DeleteFlowProjectRequest): DeleteFlowProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowProjectWithOptions(request, runtime);
}

model DeleteFlowProjectClusterSettingRequest {
  clusterId?: string(name='ClusterId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DeleteFlowProjectClusterSettingResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowProjectClusterSettingResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowProjectClusterSettingResponseBody(name='body'),
}

async function deleteFlowProjectClusterSettingWithOptions(request: DeleteFlowProjectClusterSettingRequest, runtime: Util.RuntimeOptions): DeleteFlowProjectClusterSettingResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlowProjectClusterSetting',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlowProjectClusterSetting(request: DeleteFlowProjectClusterSettingRequest): DeleteFlowProjectClusterSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowProjectClusterSettingWithOptions(request, runtime);
}

model DeleteFlowProjectUserRequest {
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  userName?: string(name='UserName'),
}

model DeleteFlowProjectUserResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteFlowProjectUserResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteFlowProjectUserResponseBody(name='body'),
}

async function deleteFlowProjectUserWithOptions(request: DeleteFlowProjectUserRequest, runtime: Util.RuntimeOptions): DeleteFlowProjectUserResponse {
  Util.validateModel(request);
  var query = {};
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["UserName"] = request.userName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFlowProjectUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteFlowProjectUser(request: DeleteFlowProjectUserRequest): DeleteFlowProjectUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFlowProjectUserWithOptions(request, runtime);
}

model DeleteJobRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteJobResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteJobResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteJobResponseBody(name='body'),
}

async function deleteJobWithOptions(request: DeleteJobRequest, runtime: Util.RuntimeOptions): DeleteJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteJob(request: DeleteJobRequest): DeleteJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteJobWithOptions(request, runtime);
}

model DeleteLibrariesRequest {
  libraryBizIdList?: [ string ](name='LibraryBizIdList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteLibrariesResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteLibrariesResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteLibrariesResponseBody(name='body'),
}

async function deleteLibrariesWithOptions(request: DeleteLibrariesRequest, runtime: Util.RuntimeOptions): DeleteLibrariesResponse {
  Util.validateModel(request);
  var query = {};
  query["LibraryBizIdList"] = request.libraryBizIdList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLibraries',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLibraries(request: DeleteLibrariesRequest): DeleteLibrariesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLibrariesWithOptions(request, runtime);
}

model DeleteResourcePoolRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourcePoolId?: string(name='ResourcePoolId'),
}

model DeleteResourcePoolResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteResourcePoolResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteResourcePoolResponseBody(name='body'),
}

async function deleteResourcePoolWithOptions(request: DeleteResourcePoolRequest, runtime: Util.RuntimeOptions): DeleteResourcePoolResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourcePoolId"] = request.resourcePoolId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteResourcePool',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteResourcePool(request: DeleteResourcePoolRequest): DeleteResourcePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteResourcePoolWithOptions(request, runtime);
}

model DeleteResourceQueueRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceQueueId?: string(name='ResourceQueueId'),
}

model DeleteResourceQueueResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteResourceQueueResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteResourceQueueResponseBody(name='body'),
}

async function deleteResourceQueueWithOptions(request: DeleteResourceQueueRequest, runtime: Util.RuntimeOptions): DeleteResourceQueueResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceQueueId"] = request.resourceQueueId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteResourceQueue',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteResourceQueue(request: DeleteResourceQueueRequest): DeleteResourceQueueResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteResourceQueueWithOptions(request, runtime);
}

model DeleteScalingRuleRequest {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingRuleId?: string(name='ScalingRuleId'),
}

model DeleteScalingRuleResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteScalingRuleResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteScalingRuleResponseBody(name='body'),
}

async function deleteScalingRuleWithOptions(request: DeleteScalingRuleRequest, runtime: Util.RuntimeOptions): DeleteScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostGroupId"] = request.hostGroupId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingRuleId"] = request.scalingRuleId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScalingRule',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteScalingRule(request: DeleteScalingRuleRequest): DeleteScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScalingRuleWithOptions(request, runtime);
}

model DeleteTagRequest {
  category?: string(name='Category'),
  description?: string(name='Description'),
  id?: long(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteTagResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model DeleteTagResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteTagResponseBody(name='body'),
}

async function deleteTagWithOptions(request: DeleteTagRequest, runtime: Util.RuntimeOptions): DeleteTagResponse {
  Util.validateModel(request);
  var query = {};
  query["Category"] = request.category;
  query["Description"] = request.description;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTag',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteTag(request: DeleteTagRequest): DeleteTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTagWithOptions(request, runtime);
}

model DeleteUserRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  type?: string(name='Type'),
  userId?: string(name='UserId'),
}

model DeleteUserResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteUserResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUserResponseBody(name='body'),
}

async function deleteUserWithOptions(request: DeleteUserRequest, runtime: Util.RuntimeOptions): DeleteUserResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Type"] = request.type;
  query["UserId"] = request.userId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteUser(request: DeleteUserRequest): DeleteUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserWithOptions(request, runtime);
}

model DescribeClusterBasicInfoRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeClusterBasicInfoResponseBody = {
  clusterInfo?: {
    accessInfo?: {
      ZKLinks?: {
        ZKLink?: [ 
        {
          link?: string(name='Link'),
          port?: string(name='Port'),
        }
      ](name='ZKLink')
      }(name='ZKLinks'),
    }(name='AccessInfo'),
    autoScalingAllowed?: boolean(name='AutoScalingAllowed'),
    autoScalingByLoadAllowed?: boolean(name='AutoScalingByLoadAllowed'),
    autoScalingEnable?: boolean(name='AutoScalingEnable'),
    autoScalingSpotWithLimitAllowed?: boolean(name='AutoScalingSpotWithLimitAllowed'),
    autoScalingVersion?: string(name='AutoScalingVersion'),
    autoScalingWithGraceAllowed?: boolean(name='AutoScalingWithGraceAllowed'),
    bootstrapActionList?: {
      bootstrapAction?: [ 
      {
        arg?: string(name='Arg'),
        name?: string(name='Name'),
        path?: string(name='Path'),
      }
    ](name='BootstrapAction')
    }(name='BootstrapActionList'),
    bootstrapFailed?: boolean(name='BootstrapFailed'),
    chargeType?: string(name='ChargeType'),
    clusterId?: string(name='ClusterId'),
    configurations?: string(name='Configurations'),
    coreNodeInService?: int32(name='CoreNodeInService'),
    coreNodeTotal?: int32(name='CoreNodeTotal'),
    createResource?: string(name='CreateResource'),
    createType?: string(name='CreateType'),
    depositType?: string(name='DepositType'),
    easEnable?: boolean(name='EasEnable'),
    expiredTime?: long(name='ExpiredTime'),
    extraInfo?: string(name='ExtraInfo'),
    failReason?: {
      errorCode?: string(name='ErrorCode'),
      errorMsg?: string(name='ErrorMsg'),
      requestId?: string(name='RequestId'),
    }(name='FailReason'),
    gatewayClusterIds?: string(name='GatewayClusterIds'),
    gatewayClusterInfoList?: {
      gatewayClusterInfo?: [ 
      {
        clusterId?: string(name='ClusterId'),
        clusterName?: string(name='ClusterName'),
        status?: string(name='Status'),
      }
    ](name='GatewayClusterInfo')
    }(name='GatewayClusterInfoList'),
    highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
    hostPoolInfo?: {
      hpBizId?: string(name='HpBizId'),
      hpName?: string(name='HpName'),
    }(name='HostPoolInfo'),
    imageId?: string(name='ImageId'),
    instanceGeneration?: string(name='InstanceGeneration'),
    ioOptimized?: boolean(name='IoOptimized'),
    k8sClusterId?: string(name='K8sClusterId'),
    localMetaDb?: boolean(name='LocalMetaDb'),
    logEnable?: boolean(name='LogEnable'),
    logPath?: string(name='LogPath'),
    machineType?: string(name='MachineType'),
    masterNodeInService?: int32(name='MasterNodeInService'),
    masterNodeTotal?: int32(name='MasterNodeTotal'),
    metaStoreType?: string(name='MetaStoreType'),
    name?: string(name='Name'),
    netType?: string(name='NetType'),
    operationId?: string(name='OperationId'),
    period?: int32(name='Period'),
    regionId?: string(name='RegionId'),
    relateClusterId?: string(name='RelateClusterId'),
    relateClusterInfo?: {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      clusterType?: string(name='ClusterType'),
      status?: string(name='Status'),
    }(name='RelateClusterInfo'),
    resizeDiskEnable?: boolean(name='ResizeDiskEnable'),
    runningTime?: int32(name='RunningTime'),
    securityGroupId?: string(name='SecurityGroupId'),
    securityGroupName?: string(name='SecurityGroupName'),
    showSoftwareInterface?: boolean(name='ShowSoftwareInterface'),
    softwareInfo?: {
      clusterType?: string(name='ClusterType'),
      emrVer?: string(name='EmrVer'),
      softwares?: {
        software?: [ 
        {
          displayName?: string(name='DisplayName'),
          name?: string(name='Name'),
          onlyDisplay?: boolean(name='OnlyDisplay'),
          startTpe?: int32(name='StartTpe'),
          version?: string(name='Version'),
        }
      ](name='Software')
      }(name='Softwares'),
    }(name='SoftwareInfo'),
    startTime?: long(name='StartTime'),
    status?: string(name='Status'),
    stopTime?: long(name='StopTime'),
    taskNodeInService?: int32(name='TaskNodeInService'),
    taskNodeTotal?: int32(name='TaskNodeTotal'),
    userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
    userId?: string(name='UserId'),
    vSwitchId?: string(name='VSwitchId'),
    vpcId?: string(name='VpcId'),
    zoneId?: string(name='ZoneId'),
  }(name='ClusterInfo'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterBasicInfoResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterBasicInfoResponseBody(name='body'),
}

async function describeClusterBasicInfoWithOptions(request: DescribeClusterBasicInfoRequest, runtime: Util.RuntimeOptions): DescribeClusterBasicInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterBasicInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterBasicInfo(request: DescribeClusterBasicInfoRequest): DescribeClusterBasicInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterBasicInfoWithOptions(request, runtime);
}

model DescribeClusterMetaCollectRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeClusterMetaCollectResponseBody = {
  clusterId?: string(name='ClusterId'),
  metaStoreType?: string(name='MetaStoreType'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model DescribeClusterMetaCollectResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterMetaCollectResponseBody(name='body'),
}

async function describeClusterMetaCollectWithOptions(request: DescribeClusterMetaCollectRequest, runtime: Util.RuntimeOptions): DescribeClusterMetaCollectResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterMetaCollect',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterMetaCollect(request: DescribeClusterMetaCollectRequest): DescribeClusterMetaCollectResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterMetaCollectWithOptions(request, runtime);
}

model DescribeClusterOperationHostTaskLogRequest {
  clusterId?: string(name='ClusterId'),
  hostId?: string(name='HostId'),
  operationId?: string(name='OperationId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: string(name='Status'),
  taskId?: string(name='TaskId'),
}

model DescribeClusterOperationHostTaskLogResponseBody = {
  requestId?: string(name='RequestId'),
  stderr?: string(name='Stderr'),
  stdout?: string(name='Stdout'),
}

model DescribeClusterOperationHostTaskLogResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterOperationHostTaskLogResponseBody(name='body'),
}

async function describeClusterOperationHostTaskLogWithOptions(request: DescribeClusterOperationHostTaskLogRequest, runtime: Util.RuntimeOptions): DescribeClusterOperationHostTaskLogResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostId"] = request.hostId;
  query["OperationId"] = request.operationId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Status"] = request.status;
  query["TaskId"] = request.taskId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterOperationHostTaskLog',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterOperationHostTaskLog(request: DescribeClusterOperationHostTaskLogRequest): DescribeClusterOperationHostTaskLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterOperationHostTaskLogWithOptions(request, runtime);
}

model DescribeClusterResourcePoolSchedulerTypeRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeClusterResourcePoolSchedulerTypeResponseBody = {
  currentSchedulerType?: string(name='CurrentSchedulerType'),
  defaultSchedulerType?: string(name='DefaultSchedulerType'),
  requestId?: string(name='RequestId'),
  supportSchedulerType?: string(name='SupportSchedulerType'),
}

model DescribeClusterResourcePoolSchedulerTypeResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterResourcePoolSchedulerTypeResponseBody(name='body'),
}

async function describeClusterResourcePoolSchedulerTypeWithOptions(request: DescribeClusterResourcePoolSchedulerTypeRequest, runtime: Util.RuntimeOptions): DescribeClusterResourcePoolSchedulerTypeResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterResourcePoolSchedulerType',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterResourcePoolSchedulerType(request: DescribeClusterResourcePoolSchedulerTypeRequest): DescribeClusterResourcePoolSchedulerTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterResourcePoolSchedulerTypeWithOptions(request, runtime);
}

model DescribeClusterServiceRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model DescribeClusterServiceResponseBody = {
  requestId?: string(name='RequestId'),
  serviceInfo?: {
    clusterServiceSummaryList?: {
      clusterServiceSummary?: [ 
      {
        alertInfo?: string(name='AlertInfo'),
        category?: string(name='Category'),
        desiredStoppedValue?: int32(name='DesiredStoppedValue'),
        displayName?: string(name='DisplayName'),
        key?: string(name='Key'),
        status?: string(name='Status'),
        type?: string(name='Type'),
        value?: string(name='Value'),
      }
    ](name='ClusterServiceSummary')
    }(name='ClusterServiceSummaryList'),
    needRestartComponentNameList?: {
      service?: [ string ](name='Service')
    }(name='NeedRestartComponentNameList'),
    needRestartHostIdList?: {
      service?: [ string ](name='Service')
    }(name='NeedRestartHostIdList'),
    needRestartInfo?: string(name='NeedRestartInfo'),
    needRestartNum?: int32(name='NeedRestartNum'),
    serviceActionList?: {
      serviceAction?: [ 
      {
        actionName?: string(name='ActionName'),
        command?: string(name='Command'),
        componentName?: string(name='ComponentName'),
        displayName?: string(name='DisplayName'),
        serviceName?: string(name='ServiceName'),
      }
    ](name='ServiceAction')
    }(name='ServiceActionList'),
    serviceName?: string(name='ServiceName'),
    serviceStatus?: string(name='ServiceStatus'),
    serviceVersion?: string(name='ServiceVersion'),
  }(name='ServiceInfo'),
}

model DescribeClusterServiceResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterServiceResponseBody(name='body'),
}

async function describeClusterServiceWithOptions(request: DescribeClusterServiceRequest, runtime: Util.RuntimeOptions): DescribeClusterServiceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterService',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterService(request: DescribeClusterServiceRequest): DescribeClusterServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterServiceWithOptions(request, runtime);
}

model DescribeClusterServiceConfigRequest {
  clusterId?: string(name='ClusterId'),
  configVersion?: string(name='ConfigVersion'),
  groupId?: string(name='GroupId'),
  hostInstanceId?: string(name='HostInstanceId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
  tagValue?: string(name='TagValue'),
}

model DescribeClusterServiceConfigResponseBody = {
  config?: {
    applied?: string(name='Applied'),
    author?: string(name='Author'),
    comment?: string(name='Comment'),
    configValueList?: {
      configValue?: [ 
      {
        allowCustom?: boolean(name='AllowCustom'),
        configItemValueList?: {
          configItemValue?: [ 
          {
            description?: string(name='Description'),
            isCustom?: boolean(name='IsCustom'),
            itemName?: string(name='ItemName'),
            value?: string(name='Value'),
          }
        ](name='ConfigItemValue')
        }(name='ConfigItemValueList'),
        configName?: string(name='ConfigName'),
        scope?: string(name='Scope'),
        scopeId?: long(name='ScopeId'),
      }
    ](name='ConfigValue')
    }(name='ConfigValueList'),
    configVersion?: string(name='ConfigVersion'),
    createTime?: string(name='CreateTime'),
    propertyInfoList?: {
      propertyInfo?: [ 
      {
        component?: string(name='Component'),
        description?: string(name='Description'),
        displayName?: string(name='DisplayName'),
        effectWay?: {
          effectType?: string(name='EffectType'),
          invokeServiceName?: string(name='InvokeServiceName'),
        }(name='EffectWay'),
        fileName?: string(name='FileName'),
        name?: string(name='Name'),
        propertyTypes?: {
          propertyType?: [ string ](name='propertyType')
        }(name='PropertyTypes'),
        propertyValueAttributes?: {
          entries?: {
            valueEntryInfo?: [ 
            {
              description?: string(name='Description'),
              label?: string(name='Label'),
              value?: string(name='Value'),
            }
          ](name='ValueEntryInfo')
          }(name='Entries'),
          hidden?: boolean(name='Hidden'),
          incrememtStep?: string(name='IncrememtStep'),
          maximum?: string(name='Maximum'),
          mimimum?: string(name='Mimimum'),
          readOnly?: boolean(name='ReadOnly'),
          type?: string(name='Type'),
          unit?: string(name='Unit'),
        }(name='PropertyValueAttributes'),
        serviceName?: string(name='ServiceName'),
        value?: string(name='Value'),
      }
    ](name='PropertyInfo')
    }(name='PropertyInfoList'),
    serviceName?: string(name='ServiceName'),
  }(name='Config'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterServiceConfigResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterServiceConfigResponseBody(name='body'),
}

async function describeClusterServiceConfigWithOptions(request: DescribeClusterServiceConfigRequest, runtime: Util.RuntimeOptions): DescribeClusterServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ConfigVersion"] = request.configVersion;
  query["GroupId"] = request.groupId;
  query["HostInstanceId"] = request.hostInstanceId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  query["TagValue"] = request.tagValue;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterServiceConfig',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterServiceConfig(request: DescribeClusterServiceConfigRequest): DescribeClusterServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterServiceConfigWithOptions(request, runtime);
}

model DescribeClusterServiceConfigHistoryRequest {
  clusterId?: string(name='ClusterId'),
  configVersion?: string(name='ConfigVersion'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model DescribeClusterServiceConfigHistoryResponseBody = {
  config?: {
    applied?: boolean(name='Applied'),
    author?: string(name='Author'),
    comment?: string(name='Comment'),
    configValueList?: {
      configValue?: [ 
      {
        configItemValueList?: {
          configItemValue?: [ 
          {
            changeType?: string(name='ChangeType'),
            itemName?: string(name='ItemName'),
            oldValue?: string(name='OldValue'),
            value?: string(name='Value'),
          }
        ](name='ConfigItemValue')
        }(name='ConfigItemValueList'),
        configName?: string(name='ConfigName'),
      }
    ](name='ConfigValue')
    }(name='ConfigValueList'),
    configVersion?: string(name='ConfigVersion'),
    createTime?: string(name='CreateTime'),
    serviceName?: string(name='ServiceName'),
  }(name='Config'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterServiceConfigHistoryResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterServiceConfigHistoryResponseBody(name='body'),
}

async function describeClusterServiceConfigHistoryWithOptions(request: DescribeClusterServiceConfigHistoryRequest, runtime: Util.RuntimeOptions): DescribeClusterServiceConfigHistoryResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ConfigVersion"] = request.configVersion;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterServiceConfigHistory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterServiceConfigHistory(request: DescribeClusterServiceConfigHistoryRequest): DescribeClusterServiceConfigHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterServiceConfigHistoryWithOptions(request, runtime);
}

model DescribeClusterServiceConfigTagRequest {
  clusterId?: string(name='ClusterId'),
  configTag?: string(name='ConfigTag'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model DescribeClusterServiceConfigTagResponseBody = {
  configTagList?: {
    configTag?: [ 
    {
      tag?: string(name='Tag'),
      tagDesc?: string(name='TagDesc'),
      valueList?: {
        value?: [ 
        {
          value?: string(name='Value'),
          valueDesc?: string(name='ValueDesc'),
        }
      ](name='Value')
      }(name='ValueList'),
    }
  ](name='ConfigTag')
  }(name='ConfigTagList'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterServiceConfigTagResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterServiceConfigTagResponseBody(name='body'),
}

async function describeClusterServiceConfigTagWithOptions(request: DescribeClusterServiceConfigTagRequest, runtime: Util.RuntimeOptions): DescribeClusterServiceConfigTagResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ConfigTag"] = request.configTag;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterServiceConfigTag',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterServiceConfigTag(request: DescribeClusterServiceConfigTagRequest): DescribeClusterServiceConfigTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterServiceConfigTagWithOptions(request, runtime);
}

model DescribeClusterTemplateRequest {
  bizId?: string(name='BizId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeClusterTemplateResponseBody = {
  requestId?: string(name='RequestId'),
  templateInfo?: {
    allowNotebook?: boolean(name='AllowNotebook'),
    bootstrapActionList?: {
      bootstrapAction?: [ 
      {
        arg?: string(name='Arg'),
        name?: string(name='Name'),
        path?: string(name='Path'),
      }
    ](name='BootstrapAction')
    }(name='BootstrapActionList'),
    clusterType?: string(name='ClusterType'),
    configList?: {
      config?: [ 
      {
        configKey?: string(name='ConfigKey'),
        configValue?: string(name='ConfigValue'),
        encrypt?: string(name='Encrypt'),
        fileName?: string(name='FileName'),
        replace?: string(name='Replace'),
        serviceName?: string(name='ServiceName'),
      }
    ](name='Config')
    }(name='ConfigList'),
    configurations?: string(name='Configurations'),
    createSource?: string(name='CreateSource'),
    depositType?: string(name='DepositType'),
    easEnable?: boolean(name='EasEnable'),
    emrVer?: string(name='EmrVer'),
    gmtCreate?: long(name='GmtCreate'),
    gmtModified?: long(name='GmtModified'),
    highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
    hostGroupList?: {
      hostGroup?: [ 
      {
        chargeType?: string(name='ChargeType'),
        diskCapacity?: int32(name='DiskCapacity'),
        diskCount?: int32(name='DiskCount'),
        diskType?: string(name='DiskType'),
        hostGroupId?: string(name='HostGroupId'),
        hostGroupName?: string(name='HostGroupName'),
        hostGroupType?: string(name='HostGroupType'),
        instanceType?: string(name='InstanceType'),
        multiInstanceTypes?: string(name='MultiInstanceTypes'),
        nodeCount?: int32(name='NodeCount'),
        period?: string(name='Period'),
        sysDiskCapacity?: int32(name='SysDiskCapacity'),
        sysDiskType?: string(name='SysDiskType'),
      }
    ](name='HostGroup')
    }(name='HostGroupList'),
    id?: string(name='Id'),
    initCustomHiveMetaDb?: boolean(name='InitCustomHiveMetaDb'),
    instanceGeneration?: string(name='InstanceGeneration'),
    ioOptimized?: boolean(name='IoOptimized'),
    isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
    keyPairName?: string(name='KeyPairName'),
    logEnable?: boolean(name='LogEnable'),
    logPath?: string(name='LogPath'),
    machineType?: string(name='MachineType'),
    masterNodeTotal?: int32(name='MasterNodeTotal'),
    masterPwd?: string(name='MasterPwd'),
    metaStoreConf?: string(name='MetaStoreConf'),
    metaStoreType?: string(name='MetaStoreType'),
    netType?: string(name='NetType'),
    securityGroupId?: string(name='SecurityGroupId'),
    securityGroupName?: string(name='SecurityGroupName'),
    softwareInfoList?: {
      softwareInfo?: [ string ](name='SoftwareInfo')
    }(name='SoftwareInfoList'),
    sshEnable?: boolean(name='SshEnable'),
    tags?: {
      tag?: [ 
      {
        tagKey?: string(name='TagKey'),
        tagValue?: string(name='TagValue'),
      }
    ](name='Tag')
    }(name='Tags'),
    templateName?: string(name='TemplateName'),
    useCustomHiveMetaDb?: boolean(name='UseCustomHiveMetaDb'),
    useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
    userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
    userId?: string(name='UserId'),
    vSwitchId?: string(name='VSwitchId'),
    vpcId?: string(name='VpcId'),
    zoneId?: string(name='ZoneId'),
  }(name='TemplateInfo'),
}

model DescribeClusterTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterTemplateResponseBody(name='body'),
}

async function describeClusterTemplateWithOptions(request: DescribeClusterTemplateRequest, runtime: Util.RuntimeOptions): DescribeClusterTemplateResponse {
  Util.validateModel(request);
  var query = {};
  query["BizId"] = request.bizId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterTemplate',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterTemplate(request: DescribeClusterTemplateRequest): DescribeClusterTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterTemplateWithOptions(request, runtime);
}

model DescribeClusterV2Request {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeClusterV2ResponseBody = {
  clusterInfo?: {
    accessInfo?: {
      ZKLinks?: {
        ZKLink?: [ 
        {
          link?: string(name='Link'),
          port?: string(name='Port'),
        }
      ](name='ZKLink')
      }(name='ZKLinks'),
    }(name='AccessInfo'),
    autoScalingAllowed?: boolean(name='AutoScalingAllowed'),
    autoScalingByLoadAllowed?: boolean(name='AutoScalingByLoadAllowed'),
    autoScalingEnable?: boolean(name='AutoScalingEnable'),
    autoScalingSpotWithLimitAllowed?: boolean(name='AutoScalingSpotWithLimitAllowed'),
    autoScalingVersion?: string(name='AutoScalingVersion'),
    autoScalingWithGraceAllowed?: boolean(name='AutoScalingWithGraceAllowed'),
    bootstrapActionList?: {
      bootstrapAction?: [ 
      {
        arg?: string(name='Arg'),
        name?: string(name='Name'),
        path?: string(name='Path'),
      }
    ](name='BootstrapAction')
    }(name='BootstrapActionList'),
    bootstrapFailed?: boolean(name='BootstrapFailed'),
    chargeType?: string(name='ChargeType'),
    configurations?: string(name='Configurations'),
    coreNodeInService?: int32(name='CoreNodeInService'),
    coreNodeTotal?: int32(name='CoreNodeTotal'),
    createResource?: string(name='CreateResource'),
    createType?: string(name='CreateType'),
    depositType?: string(name='DepositType'),
    easEnable?: boolean(name='EasEnable'),
    expiredTime?: long(name='ExpiredTime'),
    extraInfo?: string(name='ExtraInfo'),
    failReason?: {
      errorCode?: string(name='ErrorCode'),
      errorMsg?: string(name='ErrorMsg'),
      requestId?: string(name='RequestId'),
    }(name='FailReason'),
    gatewayClusterIds?: string(name='GatewayClusterIds'),
    gatewayClusterInfoList?: {
      gatewayClusterInfo?: [ 
      {
        clusterId?: string(name='ClusterId'),
        clusterName?: string(name='ClusterName'),
        status?: string(name='Status'),
      }
    ](name='GatewayClusterInfo')
    }(name='GatewayClusterInfoList'),
    highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
    hostGroupList?: {
      hostGroup?: [ 
      {
        bandWidth?: string(name='BandWidth'),
        chargeType?: string(name='ChargeType'),
        cpuCore?: int32(name='CpuCore'),
        diskCapacity?: int32(name='DiskCapacity'),
        diskCount?: int32(name='DiskCount'),
        diskType?: string(name='DiskType'),
        hostGroupChangeStatus?: string(name='HostGroupChangeStatus'),
        hostGroupChangeType?: string(name='HostGroupChangeType'),
        hostGroupId?: string(name='HostGroupId'),
        hostGroupName?: string(name='HostGroupName'),
        hostGroupSubType?: string(name='HostGroupSubType'),
        hostGroupType?: string(name='HostGroupType'),
        instanceType?: string(name='InstanceType'),
        lockReason?: string(name='LockReason'),
        lockType?: string(name='LockType'),
        memoryCapacity?: int32(name='MemoryCapacity'),
        nodeCount?: int32(name='NodeCount'),
        nodes?: {
          node?: [ 
          {
            createTime?: string(name='CreateTime'),
            daemonInfos?: {
              daemonInfo?: [ 
              {
                name?: string(name='Name'),
              }
            ](name='DaemonInfo')
            }(name='DaemonInfos'),
            diskInfos?: {
              diskInfo?: [ 
              {
                device?: string(name='Device'),
                diskId?: string(name='DiskId'),
                diskName?: string(name='DiskName'),
                size?: int32(name='Size'),
                type?: string(name='Type'),
              }
            ](name='DiskInfo')
            }(name='DiskInfos'),
            emrExpiredTime?: string(name='EmrExpiredTime'),
            expiredTime?: string(name='ExpiredTime'),
            innerIp?: string(name='InnerIp'),
            instanceId?: string(name='InstanceId'),
            pubIp?: string(name='PubIp'),
            status?: string(name='Status'),
            supportIpV6?: boolean(name='SupportIpV6'),
            zoneId?: string(name='ZoneId'),
          }
        ](name='Node')
        }(name='Nodes'),
        period?: string(name='Period'),
      }
    ](name='HostGroup')
    }(name='HostGroupList'),
    hostPoolInfo?: {
      hpBizId?: string(name='HpBizId'),
      hpName?: string(name='HpName'),
    }(name='HostPoolInfo'),
    id?: string(name='Id'),
    imageId?: string(name='ImageId'),
    instanceGeneration?: string(name='InstanceGeneration'),
    ioOptimized?: boolean(name='IoOptimized'),
    k8sClusterId?: string(name='K8sClusterId'),
    localMetaDb?: boolean(name='LocalMetaDb'),
    logEnable?: boolean(name='LogEnable'),
    logPath?: string(name='LogPath'),
    machineType?: string(name='MachineType'),
    masterNodeInService?: int32(name='MasterNodeInService'),
    masterNodeTotal?: int32(name='MasterNodeTotal'),
    metaStoreType?: string(name='MetaStoreType'),
    name?: string(name='Name'),
    netType?: string(name='NetType'),
    period?: int32(name='Period'),
    regionId?: string(name='RegionId'),
    relateClusterId?: string(name='RelateClusterId'),
    relateClusterInfo?: {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      clusterType?: string(name='ClusterType'),
      status?: string(name='Status'),
    }(name='RelateClusterInfo'),
    resizeDiskEnable?: boolean(name='ResizeDiskEnable'),
    runningTime?: int32(name='RunningTime'),
    securityGroupId?: string(name='SecurityGroupId'),
    securityGroupName?: string(name='SecurityGroupName'),
    showSoftwareInterface?: boolean(name='ShowSoftwareInterface'),
    softwareInfo?: {
      clusterType?: string(name='ClusterType'),
      emrVer?: string(name='EmrVer'),
      softwares?: {
        software?: [ 
        {
          displayName?: string(name='DisplayName'),
          name?: string(name='Name'),
          onlyDisplay?: boolean(name='OnlyDisplay'),
          startTpe?: int32(name='StartTpe'),
          version?: string(name='Version'),
        }
      ](name='Software')
      }(name='Softwares'),
    }(name='SoftwareInfo'),
    startTime?: long(name='StartTime'),
    status?: string(name='Status'),
    stopTime?: long(name='StopTime'),
    taskNodeInService?: int32(name='TaskNodeInService'),
    taskNodeTotal?: int32(name='TaskNodeTotal'),
    userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
    userId?: string(name='UserId'),
    vSwitchId?: string(name='VSwitchId'),
    vpcId?: string(name='VpcId'),
    zoneId?: string(name='ZoneId'),
  }(name='ClusterInfo'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterV2Response = {
  headers: map[string]string(name='headers'),
  body: DescribeClusterV2ResponseBody(name='body'),
}

async function describeClusterV2WithOptions(request: DescribeClusterV2Request, runtime: Util.RuntimeOptions): DescribeClusterV2Response {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeClusterV2(request: DescribeClusterV2Request): DescribeClusterV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterV2WithOptions(request, runtime);
}

model DescribeDataSourceRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeDataSourceResponseBody = {
  categoryId?: string(name='CategoryId'),
  clusterId?: string(name='ClusterId'),
  conf?: string(name='Conf'),
  createFrom?: string(name='CreateFrom'),
  creator?: string(name='Creator'),
  description?: string(name='Description'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  id?: string(name='Id'),
  modifier?: string(name='Modifier'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  sourceType?: string(name='SourceType'),
  status?: string(name='Status'),
}

model DescribeDataSourceResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDataSourceResponseBody(name='body'),
}

async function describeDataSourceWithOptions(request: DescribeDataSourceRequest, runtime: Util.RuntimeOptions): DescribeDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataSource',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDataSource(request: DescribeDataSourceRequest): DescribeDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataSourceWithOptions(request, runtime);
}

model DescribeDiskOpsActivityRequest {
  clusterId?: string(name='ClusterId'),
  currentStage?: string(name='CurrentStage'),
  currentState?: string(name='CurrentState'),
  diskId?: string(name='DiskId'),
  eventId?: string(name='EventId'),
  instanceId?: string(name='InstanceId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeDiskOpsActivityResponseBody = {
  activityState?: string(name='ActivityState'),
  clusterType?: string(name='ClusterType'),
  currentActivity?: string(name='CurrentActivity'),
  errorMessage?: string(name='ErrorMessage'),
  needReboot?: boolean(name='NeedReboot'),
  requestId?: string(name='RequestId'),
}

model DescribeDiskOpsActivityResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDiskOpsActivityResponseBody(name='body'),
}

async function describeDiskOpsActivityWithOptions(request: DescribeDiskOpsActivityRequest, runtime: Util.RuntimeOptions): DescribeDiskOpsActivityResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["CurrentStage"] = request.currentStage;
  query["CurrentState"] = request.currentState;
  query["DiskId"] = request.diskId;
  query["EventId"] = request.eventId;
  query["InstanceId"] = request.instanceId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDiskOpsActivity',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDiskOpsActivity(request: DescribeDiskOpsActivityRequest): DescribeDiskOpsActivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDiskOpsActivityWithOptions(request, runtime);
}

model DescribeEmrMainVersionRequest {
  emrVersion?: string(name='EmrVersion'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeEmrMainVersionResponseBody = {
  emrMainVersion?: {
    clusterTypeInfoList?: {
      clusterTypeInfo?: [ 
      {
        clusterType?: string(name='ClusterType'),
        serviceInfoList?: {
          serviceInfo?: [ 
          {
            display?: boolean(name='Display'),
            mandatory?: boolean(name='Mandatory'),
            serviceDisplayName?: string(name='ServiceDisplayName'),
            serviceDisplayVersion?: string(name='ServiceDisplayVersion'),
            serviceName?: string(name='ServiceName'),
            serviceVersion?: string(name='ServiceVersion'),
          }
        ](name='ServiceInfo')
        }(name='ServiceInfoList'),
      }
    ](name='ClusterTypeInfo')
    }(name='ClusterTypeInfoList'),
    clusterTypeWhiteUserList?: {
      clusterTypeWhiteUser?: [ 
      {
        clusterType?: string(name='ClusterType'),
        userId?: string(name='UserId'),
      }
    ](name='ClusterTypeWhiteUser')
    }(name='ClusterTypeWhiteUserList'),
    display?: boolean(name='Display'),
    ecmVersion?: boolean(name='EcmVersion'),
    emrVersion?: string(name='EmrVersion'),
    imageId?: string(name='ImageId'),
    publishType?: string(name='PublishType'),
    regionId?: string(name='RegionId'),
    stackName?: string(name='StackName'),
    stackVersion?: string(name='StackVersion'),
    whiteUserList?: {
      wwhiteUser?: [ string ](name='WwhiteUser')
    }(name='WhiteUserList'),
  }(name='EmrMainVersion'),
  requestId?: string(name='RequestId'),
}

model DescribeEmrMainVersionResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeEmrMainVersionResponseBody(name='body'),
}

async function describeEmrMainVersionWithOptions(request: DescribeEmrMainVersionRequest, runtime: Util.RuntimeOptions): DescribeEmrMainVersionResponse {
  Util.validateModel(request);
  var query = {};
  query["EmrVersion"] = request.emrVersion;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEmrMainVersion',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeEmrMainVersion(request: DescribeEmrMainVersionRequest): DescribeEmrMainVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeEmrMainVersionWithOptions(request, runtime);
}

model DescribeExecutionPlanRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeExecutionPlanResponseBody = {
  clusterId?: string(name='ClusterId'),
  clusterInfo?: {
    bootstrapActionList?: {
      bootstrapAction?: [ 
      {
        arg?: string(name='Arg'),
        name?: string(name='Name'),
        path?: string(name='Path'),
      }
    ](name='BootstrapAction')
    }(name='BootstrapActionList'),
    clusterType?: string(name='ClusterType'),
    configList?: {
      config?: [ 
      {
        configKey?: string(name='ConfigKey'),
        configValue?: string(name='ConfigValue'),
        encrypt?: string(name='Encrypt'),
        fileName?: string(name='FileName'),
        serviceName?: string(name='ServiceName'),
      }
    ](name='Config')
    }(name='ConfigList'),
    configurations?: string(name='Configurations'),
    easEnable?: boolean(name='EasEnable'),
    ecsOrders?: {
      ecsOrderInfo?: [ 
      {
        diskCapacity?: int32(name='DiskCapacity'),
        diskCount?: int32(name='DiskCount'),
        diskType?: string(name='DiskType'),
        index?: int32(name='Index'),
        instanceType?: string(name='InstanceType'),
        nodeCount?: int32(name='NodeCount'),
        nodeType?: string(name='NodeType'),
      }
    ](name='EcsOrderInfo')
    }(name='EcsOrders'),
    emrVer?: string(name='EmrVer'),
    highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
    initCustomHiveMetaDB?: boolean(name='InitCustomHiveMetaDB'),
    instanceGeneration?: string(name='InstanceGeneration'),
    ioOptimized?: boolean(name='IoOptimized'),
    logEnable?: boolean(name='LogEnable'),
    logPath?: string(name='LogPath'),
    name?: string(name='Name'),
    netType?: string(name='NetType'),
    securityGroupId?: string(name='SecurityGroupId'),
    softwareInfo?: {
      clusterType?: string(name='ClusterType'),
      emrVer?: string(name='EmrVer'),
      softwares?: {
        software?: [ 
        {
          displayName?: string(name='DisplayName'),
          name?: string(name='Name'),
          onlyDisplay?: boolean(name='OnlyDisplay'),
          optional?: boolean(name='Optional'),
          startTpe?: int32(name='StartTpe'),
          version?: string(name='Version'),
        }
      ](name='Software')
      }(name='Softwares'),
    }(name='SoftwareInfo'),
    useCustomHiveMetaDB?: boolean(name='UseCustomHiveMetaDB'),
    useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
    userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
    vSwitchId?: string(name='VSwitchId'),
    vpcId?: string(name='VpcId'),
    zoneId?: string(name='ZoneId'),
  }(name='ClusterInfo'),
  clusterName?: string(name='ClusterName'),
  createClusterOnDemand?: boolean(name='CreateClusterOnDemand'),
  dayOfMonth?: string(name='DayOfMonth'),
  dayOfWeek?: string(name='DayOfWeek'),
  executionPlanVersion?: long(name='ExecutionPlanVersion'),
  id?: string(name='Id'),
  jobInfoList?: {
    jobInfo?: [ 
    {
      failAct?: string(name='FailAct'),
      id?: string(name='Id'),
      name?: string(name='Name'),
      runParameter?: string(name='RunParameter'),
      type?: string(name='Type'),
    }
  ](name='JobInfo')
  }(name='JobInfoList'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  startTime?: long(name='StartTime'),
  status?: string(name='Status'),
  strategy?: string(name='Strategy'),
  timeInterval?: int32(name='TimeInterval'),
  timeUnit?: string(name='TimeUnit'),
  workflowApp?: string(name='WorkflowApp'),
}

model DescribeExecutionPlanResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeExecutionPlanResponseBody(name='body'),
}

async function describeExecutionPlanWithOptions(request: DescribeExecutionPlanRequest, runtime: Util.RuntimeOptions): DescribeExecutionPlanResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExecutionPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeExecutionPlan(request: DescribeExecutionPlanRequest): DescribeExecutionPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExecutionPlanWithOptions(request, runtime);
}

model DescribeFlowRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowResponseBody = {
  alertConf?: string(name='AlertConf'),
  alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
  alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
  application?: string(name='Application'),
  categoryId?: string(name='CategoryId'),
  clusterId?: string(name='ClusterId'),
  createCluster?: boolean(name='CreateCluster'),
  cronExpr?: string(name='CronExpr'),
  description?: string(name='Description'),
  editLockDetail?: string(name='EditLockDetail'),
  endSchedule?: long(name='EndSchedule'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  graph?: string(name='Graph'),
  hostName?: string(name='HostName'),
  id?: string(name='Id'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  name?: string(name='Name'),
  namespace?: string(name='Namespace'),
  parentFlowList?: {
    parentFlow?: [ 
    {
      parentFlowId?: string(name='ParentFlowId'),
      parentFlowName?: string(name='ParentFlowName'),
      projectId?: string(name='ProjectId'),
      projectName?: string(name='ProjectName'),
    }
  ](name='ParentFlow')
  }(name='ParentFlowList'),
  periodic?: boolean(name='Periodic'),
  requestId?: string(name='RequestId'),
  startSchedule?: long(name='StartSchedule'),
  status?: string(name='Status'),
  type?: string(name='Type'),
}

model DescribeFlowResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowResponseBody(name='body'),
}

async function describeFlowWithOptions(request: DescribeFlowRequest, runtime: Util.RuntimeOptions): DescribeFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlow(request: DescribeFlowRequest): DescribeFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowWithOptions(request, runtime);
}

model DescribeFlowCategoryRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowCategoryResponseBody = {
  categoryType?: string(name='CategoryType'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  objectId?: string(name='ObjectId'),
  objectType?: string(name='ObjectType'),
  parentId?: string(name='ParentId'),
  projectId?: string(name='ProjectId'),
  requestId?: string(name='RequestId'),
  type?: string(name='Type'),
}

model DescribeFlowCategoryResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowCategoryResponseBody(name='body'),
}

async function describeFlowCategoryWithOptions(request: DescribeFlowCategoryRequest, runtime: Util.RuntimeOptions): DescribeFlowCategoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowCategory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowCategory(request: DescribeFlowCategoryRequest): DescribeFlowCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowCategoryWithOptions(request, runtime);
}

model DescribeFlowCategoryTreeRequest {
  categoryId?: string(name='CategoryId'),
  keyword?: string(name='Keyword'),
  mode?: string(name='Mode'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  type?: string(name='Type'),
}

model DescribeFlowCategoryTreeResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeFlowCategoryTreeResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowCategoryTreeResponseBody(name='body'),
}

async function describeFlowCategoryTreeWithOptions(request: DescribeFlowCategoryTreeRequest, runtime: Util.RuntimeOptions): DescribeFlowCategoryTreeResponse {
  Util.validateModel(request);
  var query = {};
  query["CategoryId"] = request.categoryId;
  query["Keyword"] = request.keyword;
  query["Mode"] = request.mode;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowCategoryTree',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowCategoryTree(request: DescribeFlowCategoryTreeRequest): DescribeFlowCategoryTreeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowCategoryTreeWithOptions(request, runtime);
}

model DescribeFlowInstanceRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowInstanceResponseBody = {
  clusterId?: string(name='ClusterId'),
  cronExpression?: string(name='CronExpression'),
  dependencyFlowList?: {
    parentFlow?: [ 
    {
      bizDate?: long(name='BizDate'),
      dependencyFlowId?: string(name='DependencyFlowId'),
      dependencyInstanceId?: string(name='DependencyInstanceId'),
      flowId?: string(name='FlowId'),
      flowInstanceId?: string(name='FlowInstanceId'),
      meet?: boolean(name='Meet'),
      projectId?: string(name='ProjectId'),
      scheduleKey?: string(name='ScheduleKey'),
    }
  ](name='ParentFlow')
  }(name='DependencyFlowList'),
  duration?: long(name='Duration'),
  endTime?: long(name='EndTime'),
  flowId?: string(name='FlowId'),
  flowName?: string(name='FlowName'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  graph?: string(name='Graph'),
  hasNodeFailed?: boolean(name='HasNodeFailed'),
  id?: string(name='Id'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  namespace?: string(name='Namespace'),
  nodeInstance?: {
    nodeInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      duration?: long(name='Duration'),
      endTime?: long(name='EndTime'),
      externalId?: string(name='ExternalId'),
      externalInfo?: string(name='ExternalInfo'),
      externalStatus?: string(name='ExternalStatus'),
      failAct?: string(name='FailAct'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hostName?: string(name='HostName'),
      id?: string(name='Id'),
      jobId?: string(name='JobId'),
      jobName?: string(name='JobName'),
      jobType?: string(name='JobType'),
      maxRetry?: string(name='MaxRetry'),
      nodeName?: string(name='NodeName'),
      pending?: boolean(name='Pending'),
      projectId?: string(name='ProjectId'),
      retries?: int32(name='Retries'),
      retryInterval?: string(name='RetryInterval'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='NodeInstance')
  }(name='NodeInstance'),
  projectId?: string(name='ProjectId'),
  requestId?: string(name='RequestId'),
  scheduleTime?: long(name='ScheduleTime'),
  startTime?: long(name='StartTime'),
  status?: string(name='Status'),
}

model DescribeFlowInstanceResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowInstanceResponseBody(name='body'),
}

async function describeFlowInstanceWithOptions(request: DescribeFlowInstanceRequest, runtime: Util.RuntimeOptions): DescribeFlowInstanceResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowInstance',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowInstance(request: DescribeFlowInstanceRequest): DescribeFlowInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowInstanceWithOptions(request, runtime);
}

model DescribeFlowJobRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowJobResponseBody = {
  adhoc?: string(name='Adhoc'),
  alertConf?: string(name='AlertConf'),
  categoryId?: string(name='CategoryId'),
  customVariables?: string(name='CustomVariables'),
  description?: string(name='Description'),
  editLockDetail?: string(name='EditLockDetail'),
  envConf?: string(name='EnvConf'),
  failAct?: string(name='FailAct'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  id?: string(name='Id'),
  lastInstanceId?: string(name='LastInstanceId'),
  maxRetry?: int32(name='MaxRetry'),
  maxRunningTimeSec?: long(name='MaxRunningTimeSec'),
  monitorConf?: string(name='MonitorConf'),
  name?: string(name='Name'),
  paramConf?: string(name='ParamConf'),
  params?: string(name='Params'),
  requestId?: string(name='RequestId'),
  resourceList?: {
    resource?: [ 
    {
      alias?: string(name='Alias'),
      path?: string(name='Path'),
    }
  ](name='Resource')
  }(name='ResourceList'),
  retryInterval?: long(name='RetryInterval'),
  retryPolicy?: string(name='RetryPolicy'),
  runConf?: string(name='RunConf'),
  type?: string(name='Type'),
  mode?: string(name='mode'),
}

model DescribeFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowJobResponseBody(name='body'),
}

async function describeFlowJobWithOptions(request: DescribeFlowJobRequest, runtime: Util.RuntimeOptions): DescribeFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowJob(request: DescribeFlowJobRequest): DescribeFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowJobWithOptions(request, runtime);
}

model DescribeFlowNodeInstanceRequest {
  id?: string(name='Id'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowNodeInstanceResponseBody = {
  adhoc?: boolean(name='Adhoc'),
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  duration?: long(name='Duration'),
  endTime?: long(name='EndTime'),
  envConf?: string(name='EnvConf'),
  externalChildIds?: string(name='ExternalChildIds'),
  externalId?: string(name='ExternalId'),
  externalInfo?: string(name='ExternalInfo'),
  externalStatus?: string(name='ExternalStatus'),
  externalSubId?: string(name='ExternalSubId'),
  failAct?: string(name='FailAct'),
  flowId?: string(name='FlowId'),
  flowInstanceId?: string(name='FlowInstanceId'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  hostName?: string(name='HostName'),
  id?: string(name='Id'),
  jobId?: string(name='JobId'),
  jobName?: string(name='JobName'),
  jobParams?: string(name='JobParams'),
  jobType?: string(name='JobType'),
  maxRetry?: string(name='MaxRetry'),
  mode?: string(name='Mode'),
  monitorConf?: string(name='MonitorConf'),
  nodeName?: string(name='NodeName'),
  paramConf?: string(name='ParamConf'),
  pending?: boolean(name='Pending'),
  projectId?: string(name='ProjectId'),
  requestId?: string(name='RequestId'),
  retries?: int32(name='Retries'),
  retryInterval?: string(name='RetryInterval'),
  retryPolicy?: string(name='RetryPolicy'),
  runConf?: string(name='RunConf'),
  startTime?: long(name='StartTime'),
  status?: string(name='Status'),
  type?: string(name='Type'),
}

model DescribeFlowNodeInstanceResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowNodeInstanceResponseBody(name='body'),
}

async function describeFlowNodeInstanceWithOptions(request: DescribeFlowNodeInstanceRequest, runtime: Util.RuntimeOptions): DescribeFlowNodeInstanceResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowNodeInstance',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowNodeInstance(request: DescribeFlowNodeInstanceRequest): DescribeFlowNodeInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowNodeInstanceWithOptions(request, runtime);
}

model DescribeFlowNodeInstanceContainerLogRequest {
  appId?: string(name='AppId'),
  containerId?: string(name='ContainerId'),
  length?: int32(name='Length'),
  logName?: string(name='LogName'),
  nodeInstanceId?: string(name='NodeInstanceId'),
  offset?: int32(name='Offset'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowNodeInstanceContainerLogResponseBody = {
  logEnd?: boolean(name='LogEnd'),
  logEntrys?: {
    logEntry?: [ 
    {
      content?: string(name='Content'),
    }
  ](name='LogEntry')
  }(name='LogEntrys'),
  requestId?: string(name='RequestId'),
}

model DescribeFlowNodeInstanceContainerLogResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowNodeInstanceContainerLogResponseBody(name='body'),
}

async function describeFlowNodeInstanceContainerLogWithOptions(request: DescribeFlowNodeInstanceContainerLogRequest, runtime: Util.RuntimeOptions): DescribeFlowNodeInstanceContainerLogResponse {
  Util.validateModel(request);
  var query = {};
  query["AppId"] = request.appId;
  query["ContainerId"] = request.containerId;
  query["Length"] = request.length;
  query["LogName"] = request.logName;
  query["NodeInstanceId"] = request.nodeInstanceId;
  query["Offset"] = request.offset;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowNodeInstanceContainerLog',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowNodeInstanceContainerLog(request: DescribeFlowNodeInstanceContainerLogRequest): DescribeFlowNodeInstanceContainerLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowNodeInstanceContainerLogWithOptions(request, runtime);
}

model DescribeFlowNodeInstanceLauncherLogRequest {
  endTime?: long(name='EndTime'),
  length?: int32(name='Length'),
  lines?: int32(name='Lines'),
  nodeInstanceId?: string(name='NodeInstanceId'),
  offset?: int32(name='Offset'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  reverse?: boolean(name='Reverse'),
  start?: int32(name='Start'),
  startTime?: long(name='StartTime'),
}

model DescribeFlowNodeInstanceLauncherLogResponseBody = {
  logEnd?: boolean(name='LogEnd'),
  logEntrys?: {
    logEntry?: [ 
    {
      content?: string(name='Content'),
    }
  ](name='LogEntry')
  }(name='LogEntrys'),
  requestId?: string(name='RequestId'),
}

model DescribeFlowNodeInstanceLauncherLogResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowNodeInstanceLauncherLogResponseBody(name='body'),
}

async function describeFlowNodeInstanceLauncherLogWithOptions(request: DescribeFlowNodeInstanceLauncherLogRequest, runtime: Util.RuntimeOptions): DescribeFlowNodeInstanceLauncherLogResponse {
  Util.validateModel(request);
  var query = {};
  query["EndTime"] = request.endTime;
  query["Length"] = request.length;
  query["Lines"] = request.lines;
  query["NodeInstanceId"] = request.nodeInstanceId;
  query["Offset"] = request.offset;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Reverse"] = request.reverse;
  query["Start"] = request.start;
  query["StartTime"] = request.startTime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowNodeInstanceLauncherLog',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowNodeInstanceLauncherLog(request: DescribeFlowNodeInstanceLauncherLogRequest): DescribeFlowNodeInstanceLauncherLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowNodeInstanceLauncherLogWithOptions(request, runtime);
}

model DescribeFlowProjectRequest {
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowProjectResponseBody = {
  description?: string(name='Description'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  userId?: string(name='UserId'),
}

model DescribeFlowProjectResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowProjectResponseBody(name='body'),
}

async function describeFlowProjectWithOptions(request: DescribeFlowProjectRequest, runtime: Util.RuntimeOptions): DescribeFlowProjectResponse {
  Util.validateModel(request);
  var query = {};
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowProject',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowProject(request: DescribeFlowProjectRequest): DescribeFlowProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowProjectWithOptions(request, runtime);
}

model DescribeFlowProjectClusterSettingRequest {
  clusterId?: string(name='ClusterId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model DescribeFlowProjectClusterSettingResponseBody = {
  clusterId?: string(name='ClusterId'),
  defaultQueue?: string(name='DefaultQueue'),
  defaultUser?: string(name='DefaultUser'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  hostList?: {
    host?: [ string ](name='Host')
  }(name='HostList'),
  k8sClusterId?: string(name='K8sClusterId'),
  projectId?: string(name='ProjectId'),
  queueList?: {
    queue?: [ string ](name='Queue')
  }(name='QueueList'),
  requestId?: string(name='RequestId'),
  userList?: {
    user?: [ string ](name='User')
  }(name='UserList'),
}

model DescribeFlowProjectClusterSettingResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeFlowProjectClusterSettingResponseBody(name='body'),
}

async function describeFlowProjectClusterSettingWithOptions(request: DescribeFlowProjectClusterSettingRequest, runtime: Util.RuntimeOptions): DescribeFlowProjectClusterSettingResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeFlowProjectClusterSetting',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeFlowProjectClusterSetting(request: DescribeFlowProjectClusterSettingRequest): DescribeFlowProjectClusterSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeFlowProjectClusterSettingWithOptions(request, runtime);
}

model DescribeJobRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeJobResponseBody = {
  failAct?: string(name='FailAct'),
  id?: string(name='Id'),
  maxRetry?: int32(name='MaxRetry'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  retryInterval?: int32(name='RetryInterval'),
  runParameter?: string(name='RunParameter'),
  type?: string(name='Type'),
}

model DescribeJobResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeJobResponseBody(name='body'),
}

async function describeJobWithOptions(request: DescribeJobRequest, runtime: Util.RuntimeOptions): DescribeJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeJob(request: DescribeJobRequest): DescribeJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJobWithOptions(request, runtime);
}

model DescribeLibraryDetailRequest {
  libraryBizId?: string(name='LibraryBizId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLibraryDetailResponseBody = {
  bizId?: string(name='BizId'),
  createTime?: long(name='CreateTime'),
  libraryVersion?: string(name='LibraryVersion'),
  name?: string(name='Name'),
  properties?: string(name='Properties'),
  requestId?: string(name='RequestId'),
  scope?: string(name='Scope'),
  sourceLocation?: string(name='SourceLocation'),
  sourceType?: string(name='SourceType'),
  type?: string(name='Type'),
  userId?: string(name='UserId'),
}

model DescribeLibraryDetailResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeLibraryDetailResponseBody(name='body'),
}

async function describeLibraryDetailWithOptions(request: DescribeLibraryDetailRequest, runtime: Util.RuntimeOptions): DescribeLibraryDetailResponse {
  Util.validateModel(request);
  var query = {};
  query["LibraryBizId"] = request.libraryBizId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLibraryDetail',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLibraryDetail(request: DescribeLibraryDetailRequest): DescribeLibraryDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLibraryDetailWithOptions(request, runtime);
}

model DescribeLibraryInstallTaskDetailRequest {
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  taskBizId?: string(name='TaskBizId'),
}

model DescribeLibraryInstallTaskDetailResponseBody = {
  clusterBizId?: string(name='ClusterBizId'),
  detail?: string(name='Detail'),
  endTime?: long(name='EndTime'),
  executeTime?: long(name='ExecuteTime'),
  hostname?: string(name='Hostname'),
  libraryBizId?: string(name='LibraryBizId'),
  requestId?: string(name='RequestId'),
  startTime?: long(name='StartTime'),
  taskGroupId?: string(name='TaskGroupId'),
  taskId?: string(name='TaskId'),
  taskProcess?: int32(name='TaskProcess'),
  taskStatus?: string(name='TaskStatus'),
  taskType?: string(name='TaskType'),
}

model DescribeLibraryInstallTaskDetailResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeLibraryInstallTaskDetailResponseBody(name='body'),
}

async function describeLibraryInstallTaskDetailWithOptions(request: DescribeLibraryInstallTaskDetailRequest, runtime: Util.RuntimeOptions): DescribeLibraryInstallTaskDetailResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TaskBizId"] = request.taskBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLibraryInstallTaskDetail',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLibraryInstallTaskDetail(request: DescribeLibraryInstallTaskDetailRequest): DescribeLibraryInstallTaskDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLibraryInstallTaskDetailWithOptions(request, runtime);
}

model DescribeMetaTablePreviewTaskRequest {
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  taskId?: string(name='TaskId'),
}

model DescribeMetaTablePreviewTaskResponseBody = {
  data?: {
    headers?: {
      header?: [ string ](name='Header')
    }(name='Headers'),
    rows?: {
      row?: [ 
      {
        columns?: {
          column?: [ string ](name='Column')
        }(name='Columns'),
      }
    ](name='Row')
    }(name='Rows'),
  }(name='Data'),
  endTime?: long(name='EndTime'),
  executeTime?: long(name='ExecuteTime'),
  requestId?: string(name='RequestId'),
  startTime?: long(name='StartTime'),
  taskId?: string(name='TaskId'),
  taskProcess?: int32(name='TaskProcess'),
  taskStatus?: string(name='TaskStatus'),
}

model DescribeMetaTablePreviewTaskResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeMetaTablePreviewTaskResponseBody(name='body'),
}

async function describeMetaTablePreviewTaskWithOptions(request: DescribeMetaTablePreviewTaskRequest, runtime: Util.RuntimeOptions): DescribeMetaTablePreviewTaskResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TaskId"] = request.taskId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMetaTablePreviewTask',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMetaTablePreviewTask(request: DescribeMetaTablePreviewTaskRequest): DescribeMetaTablePreviewTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMetaTablePreviewTaskWithOptions(request, runtime);
}

model DescribeScalingActivityRequest {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model DescribeScalingActivityResponseBody = {
  bizId?: string(name='BizId'),
  cause?: string(name='Cause'),
  description?: string(name='Description'),
  endTime?: long(name='EndTime'),
  expectNum?: int32(name='ExpectNum'),
  instanceIds?: string(name='InstanceIds'),
  requestId?: string(name='RequestId'),
  scalingRuleId?: string(name='ScalingRuleId'),
  startTime?: long(name='StartTime'),
  status?: string(name='Status'),
  totalCapacity?: int32(name='TotalCapacity'),
  transition?: string(name='Transition'),
}

model DescribeScalingActivityResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingActivityResponseBody(name='body'),
}

async function describeScalingActivityWithOptions(request: DescribeScalingActivityRequest, runtime: Util.RuntimeOptions): DescribeScalingActivityResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostGroupId"] = request.hostGroupId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingActivityId"] = request.scalingActivityId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingActivity',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingActivity(request: DescribeScalingActivityRequest): DescribeScalingActivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingActivityWithOptions(request, runtime);
}

model DescribeScalingCommonConfigRequest {
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeScalingCommonConfigResponseBody = {
  autoScalingConfigDecommissionQueryInterval?: long(name='AutoScalingConfigDecommissionQueryInterval'),
  autoScalingConfigSystemDiskSize?: int32(name='AutoScalingConfigSystemDiskSize'),
  autoScalingCoolDownTime?: int32(name='AutoScalingCoolDownTime'),
  autoScalingGroupMaxSizeLimit?: int32(name='AutoScalingGroupMaxSizeLimit'),
  autoScalingGroupMinSizeLimit?: int32(name='AutoScalingGroupMinSizeLimit'),
  autoScalingHookHeartbeatDefaultTime?: int32(name='AutoScalingHookHeartbeatDefaultTime'),
  autoScalingMNSScalingThreadSleepTime?: long(name='AutoScalingMNSScalingThreadSleepTime'),
  autoScalingRuleAlarmDelayLimit?: int32(name='AutoScalingRuleAlarmDelayLimit'),
  autoScalingRuleAlarmSilentTime?: int32(name='AutoScalingRuleAlarmSilentTime'),
  autoScalingRuleMinDelayLimit?: int32(name='AutoScalingRuleMinDelayLimit'),
  requestId?: string(name='RequestId'),
}

model DescribeScalingCommonConfigResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingCommonConfigResponseBody(name='body'),
}

async function describeScalingCommonConfigWithOptions(request: DescribeScalingCommonConfigRequest, runtime: Util.RuntimeOptions): DescribeScalingCommonConfigResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingCommonConfig',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingCommonConfig(request: DescribeScalingCommonConfigRequest): DescribeScalingCommonConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingCommonConfigWithOptions(request, runtime);
}

model DescribeScalingConfigItemV2Request {
  configItemType?: string(name='ConfigItemType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingConfigItemId?: string(name='ScalingConfigItemId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model DescribeScalingConfigItemV2ResponseBody = {
  configItemInformation?: string(name='ConfigItemInformation'),
  configItemType?: string(name='ConfigItemType'),
  requestId?: string(name='RequestId'),
  scalingConfigItemBizId?: string(name='ScalingConfigItemBizId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model DescribeScalingConfigItemV2Response = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingConfigItemV2ResponseBody(name='body'),
}

async function describeScalingConfigItemV2WithOptions(request: DescribeScalingConfigItemV2Request, runtime: Util.RuntimeOptions): DescribeScalingConfigItemV2Response {
  Util.validateModel(request);
  var query = {};
  query["ConfigItemType"] = request.configItemType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingConfigItemId"] = request.scalingConfigItemId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingConfigItemV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingConfigItemV2(request: DescribeScalingConfigItemV2Request): DescribeScalingConfigItemV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingConfigItemV2WithOptions(request, runtime);
}

model DescribeScalingGroupInstanceV2Request {
  hostGroupBizId?: string(name='HostGroupBizId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model DescribeScalingGroupInstanceV2ResponseBody = {
  activeRuleCategory?: string(name='ActiveRuleCategory'),
  defaultCooldown?: int32(name='DefaultCooldown'),
  hostGroupId?: string(name='HostGroupId'),
  maxSize?: int32(name='MaxSize'),
  minSize?: int32(name='MinSize'),
  multiAvailablePolicy?: string(name='MultiAvailablePolicy'),
  multiAvailablePolicyParam?: string(name='MultiAvailablePolicyParam'),
  requestId?: string(name='RequestId'),
  scalingConfig?: {
    dataDiskCategory?: string(name='DataDiskCategory'),
    dataDiskCount?: int32(name='DataDiskCount'),
    dataDiskSize?: int32(name='DataDiskSize'),
    instanceTypeList?: {
      instanceType?: [ string ](name='InstanceType')
    }(name='InstanceTypeList'),
    payType?: string(name='PayType'),
    spotPriceLimits?: {
      spotPriceLimit?: [ 
      {
        instanceType?: string(name='InstanceType'),
        priceLimit?: float(name='PriceLimit'),
      }
    ](name='SpotPriceLimit')
    }(name='SpotPriceLimits'),
    spotStrategy?: string(name='SpotStrategy'),
    sysDiskCategory?: string(name='SysDiskCategory'),
    sysDiskSize?: int32(name='SysDiskSize'),
  }(name='ScalingConfig'),
  scalingGroupId?: string(name='ScalingGroupId'),
  scalingRuleList?: {
    scalingRule?: [ 
    {
      adjustmentType?: string(name='AdjustmentType'),
      adjustmentValue?: int32(name='AdjustmentValue'),
      cloudWatchTrigger?: {
        comparisonOperator?: string(name='ComparisonOperator'),
        evaluationCount?: string(name='EvaluationCount'),
        metricDisplayName?: string(name='MetricDisplayName'),
        metricName?: string(name='MetricName'),
        period?: int32(name='Period'),
        statistics?: string(name='Statistics'),
        threshold?: string(name='Threshold'),
        unit?: string(name='Unit'),
      }(name='CloudWatchTrigger'),
      cooldown?: int32(name='Cooldown'),
      essScalingRuleId?: string(name='EssScalingRuleId'),
      launchExpirationTime?: int32(name='LaunchExpirationTime'),
      launchTime?: string(name='LaunchTime'),
      recurrenceEndTime?: string(name='RecurrenceEndTime'),
      recurrenceType?: string(name='RecurrenceType'),
      recurrenceValue?: string(name='RecurrenceValue'),
      ruleCategory?: string(name='RuleCategory'),
      ruleName?: string(name='RuleName'),
      scalingGroupId?: long(name='ScalingGroupId'),
      schedulerTrigger?: {
        launchExpirationTime?: int32(name='LaunchExpirationTime'),
        launchTime?: long(name='LaunchTime'),
        recurrenceEndTime?: long(name='RecurrenceEndTime'),
        recurrenceType?: string(name='RecurrenceType'),
        recurrenceValue?: string(name='RecurrenceValue'),
      }(name='SchedulerTrigger'),
      status?: string(name='Status'),
      timeoutWithGrace?: long(name='TimeoutWithGrace'),
      withGrace?: boolean(name='WithGrace'),
    }
  ](name='ScalingRule')
  }(name='ScalingRuleList'),
  timeoutWithGrace?: long(name='TimeoutWithGrace'),
  withGrace?: boolean(name='WithGrace'),
}

model DescribeScalingGroupInstanceV2Response = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingGroupInstanceV2ResponseBody(name='body'),
}

async function describeScalingGroupInstanceV2WithOptions(request: DescribeScalingGroupInstanceV2Request, runtime: Util.RuntimeOptions): DescribeScalingGroupInstanceV2Response {
  Util.validateModel(request);
  var query = {};
  query["HostGroupBizId"] = request.hostGroupBizId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingGroupInstanceV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingGroupInstanceV2(request: DescribeScalingGroupInstanceV2Request): DescribeScalingGroupInstanceV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingGroupInstanceV2WithOptions(request, runtime);
}

model DescribeScalingGroupV2Request {
  hostGroupBizId?: string(name='HostGroupBizId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model DescribeScalingGroupV2ResponseBody = {
  activeStatus?: string(name='ActiveStatus'),
  configState?: string(name='ConfigState'),
  description?: string(name='Description'),
  hostGroupBizId?: string(name='HostGroupBizId'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  scalingGroupId?: string(name='ScalingGroupId'),
  scalingInMode?: string(name='ScalingInMode'),
  scalingMaxSize?: int32(name='ScalingMaxSize'),
  scalingMinSize?: int32(name='ScalingMinSize'),
}

model DescribeScalingGroupV2Response = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingGroupV2ResponseBody(name='body'),
}

async function describeScalingGroupV2WithOptions(request: DescribeScalingGroupV2Request, runtime: Util.RuntimeOptions): DescribeScalingGroupV2Response {
  Util.validateModel(request);
  var query = {};
  query["HostGroupBizId"] = request.hostGroupBizId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingGroupV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingGroupV2(request: DescribeScalingGroupV2Request): DescribeScalingGroupV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingGroupV2WithOptions(request, runtime);
}

model DescribeScalingRuleRequest {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingRuleId?: string(name='ScalingRuleId'),
}

model DescribeScalingRuleResponseBody = {
  adjustmentType?: string(name='AdjustmentType'),
  adjustmentValue?: int32(name='AdjustmentValue'),
  cloudWatchTrigger?: {
    comparisonOperator?: string(name='ComparisonOperator'),
    evaluationCount?: string(name='EvaluationCount'),
    metricDisplayName?: string(name='MetricDisplayName'),
    metricName?: string(name='MetricName'),
    period?: int32(name='Period'),
    statistics?: string(name='Statistics'),
    threshold?: string(name='Threshold'),
    unit?: string(name='Unit'),
  }(name='CloudWatchTrigger'),
  cooldown?: int32(name='Cooldown'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
  ruleCategory?: string(name='RuleCategory'),
  ruleName?: string(name='RuleName'),
  schedulerTrigger?: {
    launchExpirationTime?: int32(name='LaunchExpirationTime'),
    launchTime?: long(name='LaunchTime'),
    recurrenceEndTime?: long(name='RecurrenceEndTime'),
    recurrenceType?: string(name='RecurrenceType'),
    recurrenceValue?: string(name='RecurrenceValue'),
  }(name='SchedulerTrigger'),
  status?: string(name='Status'),
  timeoutWithGrace?: long(name='TimeoutWithGrace'),
  withGrace?: boolean(name='WithGrace'),
}

model DescribeScalingRuleResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeScalingRuleResponseBody(name='body'),
}

async function describeScalingRuleWithOptions(request: DescribeScalingRuleRequest, runtime: Util.RuntimeOptions): DescribeScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostGroupId"] = request.hostGroupId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingRuleId"] = request.scalingRuleId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingRule',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeScalingRule(request: DescribeScalingRuleRequest): DescribeScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingRuleWithOptions(request, runtime);
}

model DescribeSecurityGroupAttributeRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeSecurityGroupAttributeResponseBody = {
  availableGroupList?: {
    securityGroup?: [ 
    {
      availableInstanceAmount?: int32(name='AvailableInstanceAmount'),
      creationTime?: string(name='CreationTime'),
      description?: string(name='Description'),
      ecsCount?: int32(name='EcsCount'),
      securityGroupId?: string(name='SecurityGroupId'),
      securityGroupName?: string(name='SecurityGroupName'),
      vpcId?: string(name='VpcId'),
    }
  ](name='SecurityGroup')
  }(name='AvailableGroupList'),
  requestId?: string(name='RequestId'),
  securityGroupAttributeList?: {
    securityGroupAttribute?: [ 
    {
      bizContent?: string(name='BizContent'),
      bizType?: string(name='BizType'),
    }
  ](name='SecurityGroupAttribute')
  }(name='SecurityGroupAttributeList'),
}

model DescribeSecurityGroupAttributeResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeSecurityGroupAttributeResponseBody(name='body'),
}

async function describeSecurityGroupAttributeWithOptions(request: DescribeSecurityGroupAttributeRequest, runtime: Util.RuntimeOptions): DescribeSecurityGroupAttributeResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSecurityGroupAttribute',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeSecurityGroupAttribute(request: DescribeSecurityGroupAttributeRequest): DescribeSecurityGroupAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSecurityGroupAttributeWithOptions(request, runtime);
}

model DetachAndReleaseClusterEniRequest {
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  targetClusterId?: string(name='TargetClusterId'),
  vswitchId?: string(name='VswitchId'),
}

model DetachAndReleaseClusterEniResponseBody = {
  requestId?: string(name='RequestId'),
}

model DetachAndReleaseClusterEniResponse = {
  headers: map[string]string(name='headers'),
  body: DetachAndReleaseClusterEniResponseBody(name='body'),
}

async function detachAndReleaseClusterEniWithOptions(request: DetachAndReleaseClusterEniRequest, runtime: Util.RuntimeOptions): DetachAndReleaseClusterEniResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TargetClusterId"] = request.targetClusterId;
  query["VswitchId"] = request.vswitchId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'DetachAndReleaseClusterEni',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function detachAndReleaseClusterEni(request: DetachAndReleaseClusterEniRequest): DetachAndReleaseClusterEniResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachAndReleaseClusterEniWithOptions(request, runtime);
}

model GetHdfsCapacityStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetHdfsCapacityStatisticInfoResponseBody = {
  hdfsCapacityList?: {
    clusterStatHdfsCapacity?: [ 
    {
      capacityRemaining?: long(name='CapacityRemaining'),
      capacityRemainingGB?: long(name='CapacityRemainingGB'),
      capacityTotal?: long(name='CapacityTotal'),
      capacityTotalGB?: long(name='CapacityTotalGB'),
      capacityUsed?: long(name='CapacityUsed'),
      capacityUsedGB?: long(name='CapacityUsedGB'),
      capacityUsedNonDfs?: long(name='CapacityUsedNonDfs'),
      clusterBizId?: string(name='ClusterBizId'),
      dateTime?: string(name='DateTime'),
    }
  ](name='ClusterStatHdfsCapacity')
  }(name='HdfsCapacityList'),
  requestId?: string(name='RequestId'),
}

model GetHdfsCapacityStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetHdfsCapacityStatisticInfoResponseBody(name='body'),
}

async function getHdfsCapacityStatisticInfoWithOptions(request: GetHdfsCapacityStatisticInfoRequest, runtime: Util.RuntimeOptions): GetHdfsCapacityStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetHdfsCapacityStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getHdfsCapacityStatisticInfo(request: GetHdfsCapacityStatisticInfoRequest): GetHdfsCapacityStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getHdfsCapacityStatisticInfoWithOptions(request, runtime);
}

model GetJobInputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetJobInputStatisticInfoResponseBody = {
  jobInputList?: {
    clusterStatJobInput?: [ 
    {
      applicationId?: string(name='ApplicationId'),
      bytesInput?: long(name='BytesInput'),
      finishTime?: long(name='FinishTime'),
      jobId?: string(name='JobId'),
      name?: string(name='Name'),
      queue?: string(name='Queue'),
      startTime?: long(name='StartTime'),
      state?: string(name='State'),
      user?: string(name='User'),
    }
  ](name='ClusterStatJobInput')
  }(name='JobInputList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model GetJobInputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetJobInputStatisticInfoResponseBody(name='body'),
}

async function getJobInputStatisticInfoWithOptions(request: GetJobInputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetJobInputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetJobInputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getJobInputStatisticInfo(request: GetJobInputStatisticInfoRequest): GetJobInputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getJobInputStatisticInfoWithOptions(request, runtime);
}

model GetJobOutputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetJobOutputStatisticInfoResponseBody = {
  jobOutputList?: {
    clusterStatJobOutput?: [ 
    {
      applicationId?: string(name='ApplicationId'),
      bytesOutput?: long(name='BytesOutput'),
      finishTime?: long(name='FinishTime'),
      jobId?: string(name='JobId'),
      name?: string(name='Name'),
      queue?: string(name='Queue'),
      startTime?: long(name='StartTime'),
      state?: string(name='State'),
      user?: string(name='User'),
    }
  ](name='ClusterStatJobOutput')
  }(name='JobOutputList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model GetJobOutputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetJobOutputStatisticInfoResponseBody(name='body'),
}

async function getJobOutputStatisticInfoWithOptions(request: GetJobOutputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetJobOutputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetJobOutputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getJobOutputStatisticInfo(request: GetJobOutputStatisticInfoRequest): GetJobOutputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getJobOutputStatisticInfoWithOptions(request, runtime);
}

model GetJobRunningTimeStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetJobRunningTimeStatisticInfoResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  runningTimeList?: {
    clusterStatJobRunningTime?: [ 
    {
      applicationId?: string(name='ApplicationId'),
      finishTime?: long(name='FinishTime'),
      jobId?: string(name='JobId'),
      name?: string(name='Name'),
      queue?: string(name='Queue'),
      runningTime?: long(name='RunningTime'),
      startTime?: long(name='StartTime'),
      state?: string(name='State'),
      user?: string(name='User'),
    }
  ](name='ClusterStatJobRunningTime')
  }(name='RunningTimeList'),
  total?: int32(name='Total'),
}

model GetJobRunningTimeStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetJobRunningTimeStatisticInfoResponseBody(name='body'),
}

async function getJobRunningTimeStatisticInfoWithOptions(request: GetJobRunningTimeStatisticInfoRequest, runtime: Util.RuntimeOptions): GetJobRunningTimeStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetJobRunningTimeStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getJobRunningTimeStatisticInfo(request: GetJobRunningTimeStatisticInfoRequest): GetJobRunningTimeStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getJobRunningTimeStatisticInfoWithOptions(request, runtime);
}

model GetQueueInputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetQueueInputStatisticInfoResponseBody = {
  queueInputList?: {
    clusterStatQueueInput?: [ 
    {
      bytesInput?: long(name='BytesInput'),
      queue?: string(name='Queue'),
    }
  ](name='ClusterStatQueueInput')
  }(name='QueueInputList'),
  requestId?: string(name='RequestId'),
}

model GetQueueInputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetQueueInputStatisticInfoResponseBody(name='body'),
}

async function getQueueInputStatisticInfoWithOptions(request: GetQueueInputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetQueueInputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetQueueInputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getQueueInputStatisticInfo(request: GetQueueInputStatisticInfoRequest): GetQueueInputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getQueueInputStatisticInfoWithOptions(request, runtime);
}

model GetQueueOutputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetQueueOutputStatisticInfoResponseBody = {
  queueOutputList?: {
    clusterStatQueueOutput?: [ 
    {
      bytesOutput?: long(name='BytesOutput'),
      queue?: string(name='Queue'),
    }
  ](name='ClusterStatQueueOutput')
  }(name='QueueOutputList'),
  requestId?: string(name='RequestId'),
}

model GetQueueOutputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetQueueOutputStatisticInfoResponseBody(name='body'),
}

async function getQueueOutputStatisticInfoWithOptions(request: GetQueueOutputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetQueueOutputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetQueueOutputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getQueueOutputStatisticInfo(request: GetQueueOutputStatisticInfoRequest): GetQueueOutputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getQueueOutputStatisticInfoWithOptions(request, runtime);
}

model GetQueueSubmissionStatisticInfoRequest {
  applicationType?: string(name='ApplicationType'),
  clusterId?: string(name='ClusterId'),
  finalStatus?: string(name='FinalStatus'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetQueueSubmissionStatisticInfoResponseBody = {
  queueSubmissionList?: {
    clusterStatQueueSubmission?: [ 
    {
      queue?: string(name='Queue'),
      submission?: long(name='Submission'),
    }
  ](name='ClusterStatQueueSubmission')
  }(name='QueueSubmissionList'),
  requestId?: string(name='RequestId'),
}

model GetQueueSubmissionStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetQueueSubmissionStatisticInfoResponseBody(name='body'),
}

async function getQueueSubmissionStatisticInfoWithOptions(request: GetQueueSubmissionStatisticInfoRequest, runtime: Util.RuntimeOptions): GetQueueSubmissionStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ApplicationType"] = request.applicationType;
  query["ClusterId"] = request.clusterId;
  query["FinalStatus"] = request.finalStatus;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetQueueSubmissionStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getQueueSubmissionStatisticInfo(request: GetQueueSubmissionStatisticInfoRequest): GetQueueSubmissionStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getQueueSubmissionStatisticInfoWithOptions(request, runtime);
}

model GetUserInputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetUserInputStatisticInfoResponseBody = {
  requestId?: string(name='RequestId'),
  userInputList?: {
    clusterStatUserInput?: [ 
    {
      bytesInput?: long(name='BytesInput'),
      user?: string(name='User'),
    }
  ](name='ClusterStatUserInput')
  }(name='UserInputList'),
}

model GetUserInputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetUserInputStatisticInfoResponseBody(name='body'),
}

async function getUserInputStatisticInfoWithOptions(request: GetUserInputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetUserInputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetUserInputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUserInputStatisticInfo(request: GetUserInputStatisticInfoRequest): GetUserInputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserInputStatisticInfoWithOptions(request, runtime);
}

model GetUserOutputStatisticInfoRequest {
  clusterId?: string(name='ClusterId'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetUserOutputStatisticInfoResponseBody = {
  requestId?: string(name='RequestId'),
  userOutputList?: {
    clusterStatUserOutput?: [ 
    {
      bytesOutput?: long(name='BytesOutput'),
      user?: string(name='User'),
    }
  ](name='ClusterStatUserOutput')
  }(name='UserOutputList'),
}

model GetUserOutputStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetUserOutputStatisticInfoResponseBody(name='body'),
}

async function getUserOutputStatisticInfoWithOptions(request: GetUserOutputStatisticInfoRequest, runtime: Util.RuntimeOptions): GetUserOutputStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetUserOutputStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUserOutputStatisticInfo(request: GetUserOutputStatisticInfoRequest): GetUserOutputStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserOutputStatisticInfoWithOptions(request, runtime);
}

model GetUserSubmissionStatisticInfoRequest {
  applicationType?: string(name='ApplicationType'),
  clusterId?: string(name='ClusterId'),
  finalStatus?: string(name='FinalStatus'),
  fromDatetime?: string(name='FromDatetime'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  toDatetime?: string(name='ToDatetime'),
}

model GetUserSubmissionStatisticInfoResponseBody = {
  requestId?: string(name='RequestId'),
  userSubmissionList?: {
    clusterStatUserSubmission?: [ 
    {
      submission?: long(name='Submission'),
      user?: string(name='User'),
    }
  ](name='ClusterStatUserSubmission')
  }(name='UserSubmissionList'),
}

model GetUserSubmissionStatisticInfoResponse = {
  headers: map[string]string(name='headers'),
  body: GetUserSubmissionStatisticInfoResponseBody(name='body'),
}

async function getUserSubmissionStatisticInfoWithOptions(request: GetUserSubmissionStatisticInfoRequest, runtime: Util.RuntimeOptions): GetUserSubmissionStatisticInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ApplicationType"] = request.applicationType;
  query["ClusterId"] = request.clusterId;
  query["FinalStatus"] = request.finalStatus;
  query["FromDatetime"] = request.fromDatetime;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ToDatetime"] = request.toDatetime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'GetUserSubmissionStatisticInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUserSubmissionStatisticInfo(request: GetUserSubmissionStatisticInfoRequest): GetUserSubmissionStatisticInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserSubmissionStatisticInfoWithOptions(request, runtime);
}

model InstallLibrariesRequest {
  clusterBizIdList?: [ string ](name='ClusterBizIdList'),
  libraryBizId?: string(name='LibraryBizId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model InstallLibrariesResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model InstallLibrariesResponse = {
  headers: map[string]string(name='headers'),
  body: InstallLibrariesResponseBody(name='body'),
}

async function installLibrariesWithOptions(request: InstallLibrariesRequest, runtime: Util.RuntimeOptions): InstallLibrariesResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizIdList"] = request.clusterBizIdList;
  query["LibraryBizId"] = request.libraryBizId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'InstallLibraries',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function installLibraries(request: InstallLibrariesRequest): InstallLibrariesResponse {
  var runtime = new Util.RuntimeOptions{};
  return installLibrariesWithOptions(request, runtime);
}

model JoinResourceGroupRequest {
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceId?: string(name='ResourceId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
}

model JoinResourceGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model JoinResourceGroupResponse = {
  headers: map[string]string(name='headers'),
  body: JoinResourceGroupResponseBody(name='body'),
}

async function joinResourceGroupWithOptions(request: JoinResourceGroupRequest, runtime: Util.RuntimeOptions): JoinResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceId"] = request.resourceId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'JoinResourceGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function joinResourceGroup(request: JoinResourceGroupRequest): JoinResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return joinResourceGroupWithOptions(request, runtime);
}

model KillFlowJobRequest {
  jobInstanceId?: string(name='JobInstanceId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model KillFlowJobResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model KillFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: KillFlowJobResponseBody(name='body'),
}

async function killFlowJobWithOptions(request: KillFlowJobRequest, runtime: Util.RuntimeOptions): KillFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["JobInstanceId"] = request.jobInstanceId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'KillFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function killFlowJob(request: KillFlowJobRequest): KillFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return killFlowJobWithOptions(request, runtime);
}

model ListAdviceActionRequest {
  clusterId?: string(name='ClusterId'),
  component?: string(name='Component'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListAdviceActionResponseBody = {
  items?: {
    item?: [ 
    {
      actionType?: string(name='ActionType'),
      clusterId?: string(name='ClusterId'),
      command?: string(name='Command'),
      component?: string(name='Component'),
      configItemKey?: string(name='ConfigItemKey'),
      configName?: string(name='ConfigName'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hostgroupName?: string(name='HostgroupName'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Item')
  }(name='Items'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListAdviceActionResponse = {
  headers: map[string]string(name='headers'),
  body: ListAdviceActionResponseBody(name='body'),
}

async function listAdviceActionWithOptions(request: ListAdviceActionRequest, runtime: Util.RuntimeOptions): ListAdviceActionResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Component"] = request.component;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListAdviceAction',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAdviceAction(request: ListAdviceActionRequest): ListAdviceActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAdviceActionWithOptions(request, runtime);
}

model ListApmApplicationRequest {
  appId?: string(name='AppId'),
  clusterId?: string(name='ClusterId'),
  diagnoseResult?: string(name='DiagnoseResult'),
  endTimeFrom?: long(name='EndTimeFrom'),
  endTimeTo?: long(name='EndTimeTo'),
  finalStatus?: string(name='FinalStatus'),
  jobType?: string(name='JobType'),
  name?: string(name='Name'),
  orderBy?: string(name='OrderBy'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  queue?: string(name='Queue'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  startTimeFrom?: long(name='StartTimeFrom'),
  startTimeTo?: long(name='StartTimeTo'),
  state?: string(name='State'),
  user?: string(name='User'),
}

model ListApmApplicationResponseBody = {
  apmAppInfoList?: {
    apmAppInfo?: [ 
    {
      allocatedMemory?: long(name='AllocatedMemory'),
      allocatedVcore?: long(name='AllocatedVcore'),
      applicationId?: string(name='ApplicationId'),
      applicationType?: string(name='ApplicationType'),
      clusterBizId?: string(name='ClusterBizId'),
      clusterUsagePercent?: float(name='ClusterUsagePercent'),
      diagnoseCode?: string(name='DiagnoseCode'),
      diagnoseResult?: string(name='DiagnoseResult'),
      diagnostics?: string(name='Diagnostics'),
      duration?: int32(name='Duration'),
      finalStatus?: string(name='FinalStatus'),
      finishedTime?: long(name='FinishedTime'),
      memorySeconds?: long(name='MemorySeconds'),
      name?: string(name='Name'),
      progress?: float(name='Progress'),
      queue?: string(name='Queue'),
      queueUsagePercent?: float(name='QueueUsagePercent'),
      resourceRequests?: string(name='ResourceRequests'),
      runningContainers?: int32(name='RunningContainers'),
      runningDuration?: int32(name='RunningDuration'),
      startTime?: long(name='StartTime'),
      state?: string(name='State'),
      submitTime?: long(name='SubmitTime'),
      user?: string(name='User'),
      vcoreSeconds?: long(name='VcoreSeconds'),
    }
  ](name='ApmAppInfo')
  }(name='ApmAppInfoList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListApmApplicationResponse = {
  headers: map[string]string(name='headers'),
  body: ListApmApplicationResponseBody(name='body'),
}

async function listApmApplicationWithOptions(request: ListApmApplicationRequest, runtime: Util.RuntimeOptions): ListApmApplicationResponse {
  Util.validateModel(request);
  var query = {};
  query["AppId"] = request.appId;
  query["ClusterId"] = request.clusterId;
  query["DiagnoseResult"] = request.diagnoseResult;
  query["EndTimeFrom"] = request.endTimeFrom;
  query["EndTimeTo"] = request.endTimeTo;
  query["FinalStatus"] = request.finalStatus;
  query["JobType"] = request.jobType;
  query["Name"] = request.name;
  query["OrderBy"] = request.orderBy;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["Queue"] = request.queue;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StartTimeFrom"] = request.startTimeFrom;
  query["StartTimeTo"] = request.startTimeTo;
  query["State"] = request.state;
  query["User"] = request.user;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListApmApplication',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listApmApplication(request: ListApmApplicationRequest): ListApmApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApmApplicationWithOptions(request, runtime);
}

model ListBackupsRequest {
  backupId?: [ string ](name='BackupId'),
  backupPlanId?: string(name='BackupPlanId'),
  bizId?: string(name='BizId'),
  clusterId?: string(name='ClusterId'),
  currentSize?: int32(name='CurrentSize'),
  id?: long(name='Id'),
  limit?: int32(name='Limit'),
  metadataType?: string(name='MetadataType'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
  status?: string(name='Status'),
}

model ListBackupsResponseBody = {
  items?: {
    item?: [ 
    {
      backupPlanId?: string(name='BackupPlanId'),
      clusterId?: string(name='ClusterId'),
      createTime?: long(name='CreateTime'),
      id?: string(name='Id'),
      md5?: string(name='Md5'),
      metadataInfo?: {
        metadataType?: string(name='MetadataType'),
        properties?: string(name='Properties'),
      }(name='MetadataInfo'),
      status?: string(name='Status'),
      storePath?: string(name='StorePath'),
      tarFileName?: string(name='TarFileName'),
    }
  ](name='Item')
  }(name='Items'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListBackupsResponse = {
  headers: map[string]string(name='headers'),
  body: ListBackupsResponseBody(name='body'),
}

async function listBackupsWithOptions(request: ListBackupsRequest, runtime: Util.RuntimeOptions): ListBackupsResponse {
  Util.validateModel(request);
  var query = {};
  query["BackupId"] = request.backupId;
  query["BackupPlanId"] = request.backupPlanId;
  query["BizId"] = request.bizId;
  query["ClusterId"] = request.clusterId;
  query["CurrentSize"] = request.currentSize;
  query["Id"] = request.id;
  query["Limit"] = request.limit;
  query["MetadataType"] = request.metadataType;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListBackups',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listBackups(request: ListBackupsRequest): ListBackupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBackupsWithOptions(request, runtime);
}

model ListClusterHostRequest {
  clusterId?: string(name='ClusterId'),
  componentName?: string(name='ComponentName'),
  groupType?: string(name='GroupType'),
  hostGroupId?: string(name='HostGroupId'),
  hostInstanceId?: string(name='HostInstanceId'),
  hostName?: string(name='HostName'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  privateIp?: string(name='PrivateIp'),
  publicIp?: string(name='PublicIp'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  statusList?: [ string ](name='StatusList'),
}

model ListClusterHostResponseBody = {
  hostList?: {
    host?: [ 
    {
      chargeType?: string(name='ChargeType'),
      cpu?: int32(name='Cpu'),
      createTime?: string(name='CreateTime'),
      diskList?: {
        disk?: [ 
        {
          blockMountPoint?: string(name='BlockMountPoint'),
          device?: string(name='Device'),
          diskId?: string(name='DiskId'),
          diskMountPoint?: string(name='DiskMountPoint'),
          diskSize?: int32(name='DiskSize'),
          diskType?: string(name='DiskType'),
          event?: string(name='Event'),
          type?: string(name='Type'),
        }
      ](name='Disk')
      }(name='DiskList'),
      emrExpiredTime?: string(name='EmrExpiredTime'),
      expiredTime?: long(name='ExpiredTime'),
      hostGroupId?: string(name='HostGroupId'),
      hostInstanceId?: string(name='HostInstanceId'),
      hostName?: string(name='HostName'),
      instanceStatus?: string(name='InstanceStatus'),
      instanceType?: string(name='InstanceType'),
      memory?: int32(name='Memory'),
      privateIp?: string(name='PrivateIp'),
      publicIp?: string(name='PublicIp'),
      role?: string(name='Role'),
      serialNumber?: string(name='SerialNumber'),
      status?: string(name='Status'),
      supportIpV6?: boolean(name='SupportIpV6'),
      type?: string(name='Type'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='Host')
  }(name='HostList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListClusterHostResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterHostResponseBody(name='body'),
}

async function listClusterHostWithOptions(request: ListClusterHostRequest, runtime: Util.RuntimeOptions): ListClusterHostResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ComponentName"] = request.componentName;
  query["GroupType"] = request.groupType;
  query["HostGroupId"] = request.hostGroupId;
  query["HostInstanceId"] = request.hostInstanceId;
  query["HostName"] = request.hostName;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["PrivateIp"] = request.privateIp;
  query["PublicIp"] = request.publicIp;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StatusList"] = request.statusList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterHost',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterHost(request: ListClusterHostRequest): ListClusterHostResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterHostWithOptions(request, runtime);
}

model ListClusterHostComponentRequest {
  clusterId?: string(name='ClusterId'),
  componentName?: string(name='ComponentName'),
  componentStatus?: string(name='ComponentStatus'),
  hostInstanceId?: string(name='HostInstanceId'),
  hostName?: string(name='HostName'),
  hostRole?: string(name='HostRole'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListClusterHostComponentResponseBody = {
  componentList?: {
    component?: [ 
    {
      commissionStatus?: string(name='CommissionStatus'),
      componentDisplayName?: string(name='ComponentDisplayName'),
      componentName?: string(name='ComponentName'),
      cpu?: int32(name='Cpu'),
      healthReportTime?: long(name='HealthReportTime'),
      healthStatus?: string(name='HealthStatus'),
      hostId?: string(name='HostId'),
      hostInstanceId?: string(name='HostInstanceId'),
      hostName?: string(name='HostName'),
      instanceType?: string(name='InstanceType'),
      memory?: int32(name='Memory'),
      needRestart?: boolean(name='NeedRestart'),
      privateIp?: string(name='PrivateIp'),
      publicIp?: string(name='PublicIp'),
      role?: string(name='Role'),
      serialNumber?: string(name='SerialNumber'),
      serverStatus?: string(name='ServerStatus'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceName?: string(name='ServiceName'),
      state?: string(name='State'),
      status?: string(name='Status'),
    }
  ](name='Component')
  }(name='ComponentList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListClusterHostComponentResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterHostComponentResponseBody(name='body'),
}

async function listClusterHostComponentWithOptions(request: ListClusterHostComponentRequest, runtime: Util.RuntimeOptions): ListClusterHostComponentResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ComponentName"] = request.componentName;
  query["ComponentStatus"] = request.componentStatus;
  query["HostInstanceId"] = request.hostInstanceId;
  query["HostName"] = request.hostName;
  query["HostRole"] = request.hostRole;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterHostComponent',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterHostComponent(request: ListClusterHostComponentRequest): ListClusterHostComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterHostComponentWithOptions(request, runtime);
}

model ListClusterHostGroupRequest {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  hostGroupName?: string(name='HostGroupName'),
  hostGroupType?: string(name='HostGroupType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  statusList?: [ string ](name='StatusList'),
}

model ListClusterHostGroupResponseBody = {
  clusterId?: string(name='ClusterId'),
  hostGroupList?: {
    hostGroup?: [ 
    {
      chargeType?: string(name='ChargeType'),
      comment?: string(name='Comment'),
      costSavingPercent?: float(name='CostSavingPercent'),
      cpu?: int32(name='Cpu'),
      dataDiskCount?: int32(name='DataDiskCount'),
      dataDiskSize?: int32(name='DataDiskSize'),
      dataDiskType?: string(name='DataDiskType'),
      hostGroupChangeStatus?: string(name='HostGroupChangeStatus'),
      hostGroupChangeType?: string(name='HostGroupChangeType'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostGroupSubType?: string(name='HostGroupSubType'),
      hostGroupType?: string(name='HostGroupType'),
      instanceType?: string(name='InstanceType'),
      lockReason?: string(name='LockReason'),
      lockType?: string(name='LockType'),
      memory?: int32(name='Memory'),
      nodeCount?: int32(name='NodeCount'),
      payType?: string(name='PayType'),
      scalingGroupActiveStatus?: string(name='ScalingGroupActiveStatus'),
      scalingGroupBizId?: string(name='ScalingGroupBizId'),
      scalingGroupConfigState?: string(name='ScalingGroupConfigState'),
      scalingGroupMaxNode?: int32(name='ScalingGroupMaxNode'),
      scalingGroupMinNode?: int32(name='ScalingGroupMinNode'),
      scalingInMode?: string(name='ScalingInMode'),
      securityGroupId?: string(name='SecurityGroupId'),
      status?: string(name='Status'),
      systemDiskCount?: int32(name='SystemDiskCount'),
      systemDiskSize?: int32(name='SystemDiskSize'),
      systemDiskType?: string(name='SystemDiskType'),
      vswitchId?: string(name='VswitchId'),
      gmtCreate?: string(name='gmtCreate'),
      gmtModified?: string(name='gmtModified'),
    }
  ](name='HostGroup')
  }(name='HostGroupList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListClusterHostGroupResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterHostGroupResponseBody(name='body'),
}

async function listClusterHostGroupWithOptions(request: ListClusterHostGroupRequest, runtime: Util.RuntimeOptions): ListClusterHostGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostGroupId"] = request.hostGroupId;
  query["HostGroupName"] = request.hostGroupName;
  query["HostGroupType"] = request.hostGroupType;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StatusList"] = request.statusList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterHostGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterHostGroup(request: ListClusterHostGroupRequest): ListClusterHostGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterHostGroupWithOptions(request, runtime);
}

model ListClusterInstalledServiceRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListClusterInstalledServiceResponseBody = {
  clusterInstalledServiceList?: {
    clusterInstalledService?: [ 
    {
      serviceActionList?: {
        serviceAction?: [ 
        {
          actionName?: string(name='ActionName'),
          command?: string(name='Command'),
          componentName?: string(name='ComponentName'),
          displayName?: string(name='DisplayName'),
          serviceName?: string(name='ServiceName'),
        }
      ](name='ServiceAction')
      }(name='ServiceActionList'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceEcmVersion?: string(name='ServiceEcmVersion'),
      serviceName?: string(name='ServiceName'),
      serviceVersion?: string(name='ServiceVersion'),
      state?: string(name='State'),
      abnormalNum?: int32(name='abnormalNum'),
      comment?: string(name='comment'),
      needRestartNum?: int32(name='needRestartNum'),
      notStartedNum?: int32(name='notStartedNum'),
      onlyClient?: boolean(name='onlyClient'),
      serviceStatus?: string(name='serviceStatus'),
    }
  ](name='ClusterInstalledService')
  }(name='ClusterInstalledServiceList'),
  requestId?: string(name='RequestId'),
}

model ListClusterInstalledServiceResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterInstalledServiceResponseBody(name='body'),
}

async function listClusterInstalledServiceWithOptions(request: ListClusterInstalledServiceRequest, runtime: Util.RuntimeOptions): ListClusterInstalledServiceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterInstalledService',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterInstalledService(request: ListClusterInstalledServiceRequest): ListClusterInstalledServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterInstalledServiceWithOptions(request, runtime);
}

model ListClusterOperationRequest {
  clusterId?: string(name='ClusterId'),
  operationId?: string(name='OperationId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
  status?: string(name='Status'),
}

model ListClusterOperationResponseBody = {
  clusterOperationList?: {
    clusterOperation?: [ 
    {
      comment?: string(name='Comment'),
      duration?: string(name='Duration'),
      operationId?: string(name='OperationId'),
      operationName?: string(name='OperationName'),
      percentage?: string(name='Percentage'),
      startTime?: string(name='StartTime'),
      status?: string(name='Status'),
    }
  ](name='ClusterOperation')
  }(name='ClusterOperationList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterOperationResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterOperationResponseBody(name='body'),
}

async function listClusterOperationWithOptions(request: ListClusterOperationRequest, runtime: Util.RuntimeOptions): ListClusterOperationResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["OperationId"] = request.operationId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterOperation',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterOperation(request: ListClusterOperationRequest): ListClusterOperationResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterOperationWithOptions(request, runtime);
}

model ListClusterOperationHostRequest {
  clusterId?: string(name='ClusterId'),
  operationId?: string(name='OperationId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: string(name='Status'),
}

model ListClusterOperationHostResponseBody = {
  clusterOperationHostList?: {
    clusterOperationHost?: [ 
    {
      hostId?: string(name='HostId'),
      hostName?: string(name='HostName'),
      percentage?: string(name='Percentage'),
      status?: string(name='Status'),
    }
  ](name='ClusterOperationHost')
  }(name='ClusterOperationHostList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterOperationHostResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterOperationHostResponseBody(name='body'),
}

async function listClusterOperationHostWithOptions(request: ListClusterOperationHostRequest, runtime: Util.RuntimeOptions): ListClusterOperationHostResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["OperationId"] = request.operationId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterOperationHost',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterOperationHost(request: ListClusterOperationHostRequest): ListClusterOperationHostResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterOperationHostWithOptions(request, runtime);
}

model ListClusterOperationHostTaskRequest {
  clusterId?: string(name='ClusterId'),
  hostId?: string(name='HostId'),
  operationId?: string(name='OperationId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: string(name='Status'),
}

model ListClusterOperationHostTaskResponseBody = {
  clusterOperationHostTaskList?: {
    clusterOperationHostTask?: [ 
    {
      percentage?: string(name='Percentage'),
      status?: string(name='Status'),
      taskId?: string(name='TaskId'),
      taskName?: string(name='TaskName'),
    }
  ](name='ClusterOperationHostTask')
  }(name='ClusterOperationHostTaskList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterOperationHostTaskResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterOperationHostTaskResponseBody(name='body'),
}

async function listClusterOperationHostTaskWithOptions(request: ListClusterOperationHostTaskRequest, runtime: Util.RuntimeOptions): ListClusterOperationHostTaskResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostId"] = request.hostId;
  query["OperationId"] = request.operationId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterOperationHostTask',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterOperationHostTask(request: ListClusterOperationHostTaskRequest): ListClusterOperationHostTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterOperationHostTaskWithOptions(request, runtime);
}

model ListClusterOperationTaskRequest {
  clusterId?: string(name='ClusterId'),
  operationId?: string(name='OperationId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: string(name='Status'),
}

model ListClusterOperationTaskResponseBody = {
  clusterOperationTaskList?: {
    clusterOperationTask?: [ 
    {
      percentage?: string(name='Percentage'),
      status?: string(name='Status'),
      taskId?: string(name='TaskId'),
      taskName?: string(name='TaskName'),
    }
  ](name='ClusterOperationTask')
  }(name='ClusterOperationTaskList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterOperationTaskResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterOperationTaskResponseBody(name='body'),
}

async function listClusterOperationTaskWithOptions(request: ListClusterOperationTaskRequest, runtime: Util.RuntimeOptions): ListClusterOperationTaskResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["OperationId"] = request.operationId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterOperationTask',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterOperationTask(request: ListClusterOperationTaskRequest): ListClusterOperationTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterOperationTaskWithOptions(request, runtime);
}

model ListClusterServiceRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListClusterServiceResponseBody = {
  clusterServiceList?: {
    clusterService?: [ 
    {
      abnormalNum?: int32(name='AbnormalNum'),
      clientType?: boolean(name='ClientType'),
      healthStatus?: string(name='HealthStatus'),
      installStatus?: boolean(name='InstallStatus'),
      needRestartInfo?: string(name='NeedRestartInfo'),
      needRestartNum?: int32(name='NeedRestartNum'),
      notStartInfo?: string(name='NotStartInfo'),
      serviceActionList?: {
        serviceAction?: [ 
        {
          actionName?: string(name='ActionName'),
          command?: string(name='Command'),
          componentName?: string(name='ComponentName'),
          displayName?: string(name='DisplayName'),
          serviceName?: string(name='ServiceName'),
        }
      ](name='ServiceAction')
      }(name='ServiceActionList'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceName?: string(name='ServiceName'),
      serviceStatus?: string(name='ServiceStatus'),
      serviceVersion?: string(name='ServiceVersion'),
      state?: string(name='State'),
      stoppedNum?: int32(name='StoppedNum'),
    }
  ](name='ClusterService')
  }(name='ClusterServiceList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterServiceResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterServiceResponseBody(name='body'),
}

async function listClusterServiceWithOptions(request: ListClusterServiceRequest, runtime: Util.RuntimeOptions): ListClusterServiceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterService',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterService(request: ListClusterServiceRequest): ListClusterServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceWithOptions(request, runtime);
}

model ListClusterServiceComponentRequest {
  clusterId?: string(name='ClusterId'),
  componentName?: string(name='ComponentName'),
  componentStatus?: string(name='ComponentStatus'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  podName?: string(name='PodName'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListClusterServiceComponentResponseBody = {
  componentList?: {
    component?: [ 
    {
      commissionStatus?: string(name='CommissionStatus'),
      componentDisplayName?: string(name='ComponentDisplayName'),
      componentName?: string(name='ComponentName'),
      desiredCount?: int32(name='DesiredCount'),
      namespace?: string(name='Namespace'),
      needRestart?: boolean(name='NeedRestart'),
      podName?: string(name='PodName'),
      privateIp?: string(name='PrivateIp'),
      publicIp?: string(name='PublicIp'),
      role?: string(name='Role'),
      serverStatus?: string(name='ServerStatus'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceName?: string(name='ServiceName'),
      status?: string(name='Status'),
      workloadName?: string(name='WorkloadName'),
      workloadType?: string(name='WorkloadType'),
    }
  ](name='Component')
  }(name='ComponentList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListClusterServiceComponentResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterServiceComponentResponseBody(name='body'),
}

async function listClusterServiceComponentWithOptions(request: ListClusterServiceComponentRequest, runtime: Util.RuntimeOptions): ListClusterServiceComponentResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ComponentName"] = request.componentName;
  query["ComponentStatus"] = request.componentStatus;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["PodName"] = request.podName;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceComponent',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterServiceComponent(request: ListClusterServiceComponentRequest): ListClusterServiceComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceComponentWithOptions(request, runtime);
}

model ListClusterServiceComponentHealthInfoRequest {
  clusterId?: string(name='ClusterId'),
  componentName?: string(name='ComponentName'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListClusterServiceComponentHealthInfoResponseBody = {
  clusterId?: string(name='ClusterId'),
  healthInfoList?: {
    healthInfo?: [ 
    {
      agentHeartBeatLostNum?: int32(name='AgentHeartBeatLostNum'),
      badHealthNum?: int32(name='BadHealthNum'),
      componentName?: string(name='ComponentName'),
      createdTime?: long(name='CreatedTime'),
      disabledHealthNum?: int32(name='DisabledHealthNum'),
      goodHealthNum?: int32(name='GoodHealthNum'),
      healthDetailList?: {
        healthDetail?: [ 
        {
          healthRuleParam?: {
            component?: string(name='Component'),
            hostNames?: string(name='HostNames'),
            pass?: string(name='Pass'),
            ruleDescription?: string(name='RuleDescription'),
            ruleId?: string(name='RuleId'),
            ruleTitle?: string(name='RuleTitle'),
            service?: string(name='Service'),
          }(name='HealthRuleParam'),
          code?: string(name='code'),
        }
      ](name='HealthDetail')
      }(name='HealthDetailList'),
      healthLevel?: string(name='HealthLevel'),
      healthStatus?: string(name='HealthStatus'),
      manualStoppedNum?: int32(name='ManualStoppedNum'),
      noneHealthNum?: int32(name='NoneHealthNum'),
      normalNum?: int32(name='NormalNum'),
      serviceName?: string(name='ServiceName'),
      stoppedHealthNum?: int32(name='StoppedHealthNum'),
      stoppedNum?: int32(name='StoppedNum'),
      totalNum?: int32(name='TotalNum'),
      unknownHealthNum?: int32(name='UnknownHealthNum'),
      warningHealthNum?: int32(name='WarningHealthNum'),
    }
  ](name='HealthInfo')
  }(name='HealthInfoList'),
  requestId?: string(name='RequestId'),
}

model ListClusterServiceComponentHealthInfoResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterServiceComponentHealthInfoResponseBody(name='body'),
}

async function listClusterServiceComponentHealthInfoWithOptions(request: ListClusterServiceComponentHealthInfoRequest, runtime: Util.RuntimeOptions): ListClusterServiceComponentHealthInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ComponentName"] = request.componentName;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceComponentHealthInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterServiceComponentHealthInfo(request: ListClusterServiceComponentHealthInfoRequest): ListClusterServiceComponentHealthInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceComponentHealthInfoWithOptions(request, runtime);
}

model ListClusterServiceConfigHistoryRequest {
  author?: string(name='Author'),
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  configFileName?: string(name='ConfigFileName'),
  configItemKey?: string(name='ConfigItemKey'),
  configVersion?: string(name='ConfigVersion'),
  hostGroupId?: string(name='HostGroupId'),
  hostInstanceId?: string(name='HostInstanceId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListClusterServiceConfigHistoryResponseBody = {
  configHistoryList?: {
    configHistory?: [ 
    {
      applied?: boolean(name='Applied'),
      author?: string(name='Author'),
      comment?: string(name='Comment'),
      configFileName?: string(name='ConfigFileName'),
      configItemName?: string(name='ConfigItemName'),
      configVersion?: string(name='ConfigVersion'),
      createTime?: long(name='CreateTime'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostInstanceId?: string(name='HostInstanceId'),
      hostName?: string(name='HostName'),
      newValue?: string(name='NewValue'),
      oldValue?: string(name='OldValue'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='ConfigHistory')
  }(name='ConfigHistoryList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterServiceConfigHistoryResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterServiceConfigHistoryResponseBody(name='body'),
}

async function listClusterServiceConfigHistoryWithOptions(request: ListClusterServiceConfigHistoryRequest, runtime: Util.RuntimeOptions): ListClusterServiceConfigHistoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Author"] = request.author;
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["ConfigFileName"] = request.configFileName;
  query["ConfigItemKey"] = request.configItemKey;
  query["ConfigVersion"] = request.configVersion;
  query["HostGroupId"] = request.hostGroupId;
  query["HostInstanceId"] = request.hostInstanceId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceConfigHistory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterServiceConfigHistory(request: ListClusterServiceConfigHistoryRequest): ListClusterServiceConfigHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceConfigHistoryWithOptions(request, runtime);
}

model ListClusterServiceQuickLinkRequest {
  clusterId?: string(name='ClusterId'),
  directType?: boolean(name='DirectType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ListClusterServiceQuickLinkResponseBody = {
  quickLinkList?: {
    quickLink?: [ 
    {
      port?: string(name='Port'),
      protocol?: string(name='Protocol'),
      quickLinkAddress?: string(name='QuickLinkAddress'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceName?: string(name='ServiceName'),
      type?: string(name='Type'),
    }
  ](name='QuickLink')
  }(name='QuickLinkList'),
  requestId?: string(name='RequestId'),
}

model ListClusterServiceQuickLinkResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterServiceQuickLinkResponseBody(name='body'),
}

async function listClusterServiceQuickLinkWithOptions(request: ListClusterServiceQuickLinkRequest, runtime: Util.RuntimeOptions): ListClusterServiceQuickLinkResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["DirectType"] = request.directType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceQuickLink',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterServiceQuickLink(request: ListClusterServiceQuickLinkRequest): ListClusterServiceQuickLinkResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceQuickLinkWithOptions(request, runtime);
}

model ListClusterTemplatesRequest {
  bizId?: string(name='BizId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  productType?: string(name='ProductType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListClusterTemplatesResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  templateInfoList?: {
    templateInfo?: [ 
    {
      allowNotebook?: boolean(name='AllowNotebook'),
      bootstrapActionList?: {
        bootstrapAction?: [ 
        {
          arg?: string(name='Arg'),
          name?: string(name='Name'),
          path?: string(name='Path'),
        }
      ](name='BootstrapAction')
      }(name='BootstrapActionList'),
      clusterType?: string(name='ClusterType'),
      configList?: {
        config?: [ 
        {
          configKey?: string(name='ConfigKey'),
          configValue?: string(name='ConfigValue'),
          encrypt?: string(name='Encrypt'),
          fileName?: string(name='FileName'),
          replace?: string(name='Replace'),
          serviceName?: string(name='ServiceName'),
        }
      ](name='Config')
      }(name='ConfigList'),
      configurations?: string(name='Configurations'),
      createSource?: string(name='CreateSource'),
      depositType?: string(name='DepositType'),
      easEnable?: boolean(name='EasEnable'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
      hostGroupList?: {
        hostGroup?: [ 
        {
          chargeType?: string(name='ChargeType'),
          diskCapacity?: int32(name='DiskCapacity'),
          diskCount?: int32(name='DiskCount'),
          diskType?: string(name='DiskType'),
          hostGroupId?: string(name='HostGroupId'),
          hostGroupName?: string(name='HostGroupName'),
          hostGroupType?: string(name='HostGroupType'),
          instanceType?: string(name='InstanceType'),
          multiInstanceTypes?: string(name='MultiInstanceTypes'),
          nodeCount?: int32(name='NodeCount'),
          period?: string(name='Period'),
          sysDiskCapacity?: int32(name='SysDiskCapacity'),
          sysDiskType?: string(name='SysDiskType'),
        }
      ](name='HostGroup')
      }(name='HostGroupList'),
      id?: string(name='Id'),
      initCustomHiveMetaDb?: boolean(name='InitCustomHiveMetaDb'),
      instanceGeneration?: string(name='InstanceGeneration'),
      ioOptimized?: boolean(name='IoOptimized'),
      isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
      keyPairName?: string(name='KeyPairName'),
      logEnable?: boolean(name='LogEnable'),
      logPath?: string(name='LogPath'),
      machineType?: string(name='MachineType'),
      masterNodeTotal?: int32(name='MasterNodeTotal'),
      metaStoreConf?: string(name='MetaStoreConf'),
      metaStoreType?: string(name='MetaStoreType'),
      netType?: string(name='NetType'),
      securityGroupId?: string(name='SecurityGroupId'),
      securityGroupName?: string(name='SecurityGroupName'),
      softwareInfoList?: {
        softwareInfo?: [ string ](name='SoftwareInfo')
      }(name='SoftwareInfoList'),
      sshEnable?: boolean(name='SshEnable'),
      templateName?: string(name='TemplateName'),
      useCustomHiveMetaDb?: boolean(name='UseCustomHiveMetaDb'),
      useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
      userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
      userId?: string(name='UserId'),
      vSwitchId?: string(name='VSwitchId'),
      vpcId?: string(name='VpcId'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='TemplateInfo')
  }(name='TemplateInfoList'),
  totalCount?: int32(name='TotalCount'),
}

model ListClusterTemplatesResponse = {
  headers: map[string]string(name='headers'),
  body: ListClusterTemplatesResponseBody(name='body'),
}

async function listClusterTemplatesWithOptions(request: ListClusterTemplatesRequest, runtime: Util.RuntimeOptions): ListClusterTemplatesResponse {
  Util.validateModel(request);
  var query = {};
  query["BizId"] = request.bizId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProductType"] = request.productType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterTemplates',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusterTemplates(request: ListClusterTemplatesRequest): ListClusterTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterTemplatesWithOptions(request, runtime);
}

model ListClustersRequest {
  clusterTypeList?: [ string ](name='ClusterTypeList'),
  createType?: string(name='CreateType'),
  defaultStatus?: boolean(name='DefaultStatus'),
  depositType?: string(name='DepositType'),
  expiredTagList?: [ string ](name='ExpiredTagList'),
  isDesc?: boolean(name='IsDesc'),
  machineType?: string(name='MachineType'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  statusList?: [ string ](name='StatusList'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
  vpcId?: string(name='VpcId'),
}

model ListClustersResponseBody = {
  clusters?: {
    clusterInfo?: [ 
    {
      chargeType?: string(name='ChargeType'),
      createResource?: string(name='CreateResource'),
      createTime?: long(name='CreateTime'),
      depositType?: string(name='DepositType'),
      expiredTime?: long(name='ExpiredTime'),
      failReason?: {
        errorCode?: string(name='ErrorCode'),
        errorMsg?: string(name='ErrorMsg'),
        requestId?: string(name='RequestId'),
      }(name='FailReason'),
      hasUncompletedOrder?: boolean(name='HasUncompletedOrder'),
      id?: string(name='Id'),
      k8sClusterId?: string(name='K8sClusterId'),
      machineType?: string(name='MachineType'),
      metaStoreType?: string(name='MetaStoreType'),
      name?: string(name='Name'),
      operationId?: long(name='OperationId'),
      orderList?: string(name='OrderList'),
      orderTaskInfo?: {
        currentCount?: int32(name='CurrentCount'),
        orderIdList?: string(name='OrderIdList'),
        targetCount?: int32(name='TargetCount'),
      }(name='OrderTaskInfo'),
      period?: int32(name='Period'),
      runningTime?: int32(name='RunningTime'),
      status?: string(name='Status'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey'),
          tagValue?: string(name='TagValue'),
        }
      ](name='Tag')
      }(name='Tags'),
      type?: string(name='Type'),
    }
  ](name='ClusterInfo')
  }(name='Clusters'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListClustersResponse = {
  headers: map[string]string(name='headers'),
  body: ListClustersResponseBody(name='body'),
}

async function listClustersWithOptions(request: ListClustersRequest, runtime: Util.RuntimeOptions): ListClustersResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterTypeList"] = request.clusterTypeList;
  query["CreateType"] = request.createType;
  query["DefaultStatus"] = request.defaultStatus;
  query["DepositType"] = request.depositType;
  query["ExpiredTagList"] = request.expiredTagList;
  query["IsDesc"] = request.isDesc;
  query["MachineType"] = request.machineType;
  query["Name"] = request.name;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StatusList"] = request.statusList;
  query["Tag"] = request.tag;
  query["VpcId"] = request.vpcId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListClusters',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClusters(request: ListClustersRequest): ListClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClustersWithOptions(request, runtime);
}

model ListDataSourceRequest {
  createFrom?: string(name='CreateFrom'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sourceType?: string(name='SourceType'),
}

model ListDataSourceResponseBody = {
  dataSourceList?: {
    dataSource?: [ 
    {
      clusterId?: string(name='ClusterId'),
      conf?: string(name='Conf'),
      createFrom?: string(name='CreateFrom'),
      creator?: string(name='Creator'),
      description?: string(name='Description'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      id?: string(name='Id'),
      modifier?: string(name='Modifier'),
      name?: string(name='Name'),
      sourceType?: string(name='SourceType'),
      status?: string(name='Status'),
    }
  ](name='DataSource')
  }(name='DataSourceList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListDataSourceResponse = {
  headers: map[string]string(name='headers'),
  body: ListDataSourceResponseBody(name='body'),
}

async function listDataSourceWithOptions(request: ListDataSourceRequest, runtime: Util.RuntimeOptions): ListDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  query["CreateFrom"] = request.createFrom;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SourceType"] = request.sourceType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListDataSource',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDataSource(request: ListDataSourceRequest): ListDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDataSourceWithOptions(request, runtime);
}

model ListDiskOpsEventsRequest {
  clusterId?: string(name='ClusterId'),
  endTime?: long(name='EndTime'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  startTime?: long(name='StartTime'),
}

model ListDiskOpsEventsResponseBody = {
  eventList?: {
    diskOpsEventInfo?: [ 
    {
      clusterBizId?: string(name='ClusterBizId'),
      clusterName?: string(name='ClusterName'),
      currentActivity?: string(name='CurrentActivity'),
      currentActivityState?: string(name='CurrentActivityState'),
      diskDevice?: string(name='DiskDevice'),
      diskId?: string(name='DiskId'),
      diskMountPoint?: string(name='DiskMountPoint'),
      eventId?: string(name='EventId'),
      eventTriggerTime?: long(name='EventTriggerTime'),
      eventType?: string(name='EventType'),
      instanceId?: string(name='InstanceId'),
      instanceName?: string(name='InstanceName'),
      instanceStatus?: string(name='InstanceStatus'),
      privateIp?: string(name='PrivateIp'),
      regionId?: string(name='RegionId'),
      userId?: string(name='UserId'),
    }
  ](name='DiskOpsEventInfo')
  }(name='EventList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListDiskOpsEventsResponse = {
  headers: map[string]string(name='headers'),
  body: ListDiskOpsEventsResponseBody(name='body'),
}

async function listDiskOpsEventsWithOptions(request: ListDiskOpsEventsRequest, runtime: Util.RuntimeOptions): ListDiskOpsEventsResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["EndTime"] = request.endTime;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StartTime"] = request.startTime;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListDiskOpsEvents',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDiskOpsEvents(request: ListDiskOpsEventsRequest): ListDiskOpsEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDiskOpsEventsWithOptions(request, runtime);
}

model ListEmrAvailableConfigRequest {
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListEmrAvailableConfigResponseBody = {
  emrMainVersionList?: {
    emrMainVersion?: [ 
    {
      clusterTypeInfoList?: {
        clusterTypeInfo?: [ 
        {
          clusterServiceInfoList?: {
            clusterServiceInfo?: [ 
            {
              mandatory?: boolean(name='Mandatory'),
              serviceDisplayName?: string(name='ServiceDisplayName'),
              serviceName?: string(name='ServiceName'),
              serviceVersion?: string(name='ServiceVersion'),
            }
          ](name='ClusterServiceInfo')
          }(name='ClusterServiceInfoList'),
          clusterType?: string(name='ClusterType'),
        }
      ](name='ClusterTypeInfo')
      }(name='ClusterTypeInfoList'),
      ecmVersion?: boolean(name='EcmVersion'),
      extraInfo?: string(name='ExtraInfo'),
      mainVersionName?: string(name='MainVersionName'),
      onCloudNative?: boolean(name='OnCloudNative'),
      publishType?: string(name='PublishType'),
      regionId?: string(name='RegionId'),
      stackName?: string(name='StackName'),
      stackVersion?: string(name='StackVersion'),
    }
  ](name='EmrMainVersion')
  }(name='EmrMainVersionList'),
  keyPairNameList?: {
    keyPairName?: [ string ](name='KeyPairName')
  }(name='KeyPairNameList'),
  requestId?: string(name='RequestId'),
  securityGroupList?: {
    securityGroup?: [ 
    {
      availableInstanceAmount?: int32(name='AvailableInstanceAmount'),
      creationTime?: string(name='CreationTime'),
      description?: string(name='Description'),
      ecsCount?: int32(name='EcsCount'),
      securityGroupId?: string(name='SecurityGroupId'),
      securityGroupName?: string(name='SecurityGroupName'),
      securityGroupType?: string(name='SecurityGroupType'),
      vpcId?: string(name='VpcId'),
    }
  ](name='SecurityGroup')
  }(name='SecurityGroupList'),
  vpcInfoList?: {
    vpcInfo?: [ 
    {
      cidrBlock?: string(name='CidrBlock'),
      creationTime?: string(name='CreationTime'),
      description?: string(name='Description'),
      VRouterId?: string(name='VRouterId'),
      vpcId?: string(name='VpcId'),
      vpcName?: string(name='VpcName'),
      vswitchInfoList?: {
        vswitchInfo?: [ 
        {
          availableIpAddressCount?: long(name='AvailableIpAddressCount'),
          cidrBlock?: string(name='CidrBlock'),
          creationTime?: string(name='CreationTime'),
          description?: string(name='Description'),
          vpcId?: string(name='VpcId'),
          vswitchId?: string(name='VswitchId'),
          vswitchName?: string(name='VswitchName'),
          zoneId?: string(name='ZoneId'),
        }
      ](name='VswitchInfo')
      }(name='VswitchInfoList'),
    }
  ](name='VpcInfo')
  }(name='VpcInfoList'),
}

model ListEmrAvailableConfigResponse = {
  headers: map[string]string(name='headers'),
  body: ListEmrAvailableConfigResponseBody(name='body'),
}

async function listEmrAvailableConfigWithOptions(request: ListEmrAvailableConfigRequest, runtime: Util.RuntimeOptions): ListEmrAvailableConfigResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListEmrAvailableConfig',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEmrAvailableConfig(request: ListEmrAvailableConfigRequest): ListEmrAvailableConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEmrAvailableConfigWithOptions(request, runtime);
}

model ListEmrAvailableResourceRequest {
  clusterId?: string(name='ClusterId'),
  clusterType?: string(name='ClusterType'),
  dataDiskType?: string(name='DataDiskType'),
  depositType?: string(name='DepositType'),
  destinationResource?: string(name='DestinationResource'),
  emrVersion?: string(name='EmrVersion'),
  instanceChargeType?: string(name='InstanceChargeType'),
  instanceType?: string(name='InstanceType'),
  netType?: string(name='NetType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  spotStrategy?: string(name='SpotStrategy'),
  systemDiskType?: string(name='SystemDiskType'),
  zoneId?: string(name='ZoneId'),
}

model ListEmrAvailableResourceResponseBody = {
  emrZoneInfoList?: {
    emrZoneInfo?: [ 
    {
      emrResourceInfoList?: {
        emrResourceInfo?: [ 
        {
          supportedResourceList?: {
            supportedResource?: [ 
            {
              emrInstanceType?: {
                baselineCredit?: int32(name='BaselineCredit'),
                cpuCoreCount?: int32(name='CpuCoreCount'),
                eniQuantity?: int32(name='EniQuantity'),
                GPUAmount?: int32(name='GPUAmount'),
                GPUSpec?: string(name='GPUSpec'),
                initialCredit?: int32(name='InitialCredit'),
                instanceBandwidthRx?: int32(name='InstanceBandwidthRx'),
                instanceBandwidthTx?: int32(name='InstanceBandwidthTx'),
                instancePpsRx?: long(name='InstancePpsRx'),
                instancePpsTx?: long(name='InstancePpsTx'),
                instanceType?: string(name='InstanceType'),
                instanceTypeFamily?: string(name='InstanceTypeFamily'),
                localStorageAmount?: int32(name='LocalStorageAmount'),
                localStorageCapacity?: long(name='LocalStorageCapacity'),
                localStorageCategory?: string(name='LocalStorageCategory'),
                memorySize?: int32(name='MemorySize'),
              }(name='EmrInstanceType'),
              max?: int32(name='Max'),
              min?: int32(name='Min'),
              supportNodeTypeList?: {
                supportNodeType?: [ string ](name='SupportNodeType')
              }(name='SupportNodeTypeList'),
              unit?: string(name='Unit'),
              value?: string(name='Value'),
            }
          ](name='SupportedResource')
          }(name='SupportedResourceList'),
          type?: string(name='Type'),
        }
      ](name='EmrResourceInfo')
      }(name='EmrResourceInfoList'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='EmrZoneInfo')
  }(name='EmrZoneInfoList'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
}

model ListEmrAvailableResourceResponse = {
  headers: map[string]string(name='headers'),
  body: ListEmrAvailableResourceResponseBody(name='body'),
}

async function listEmrAvailableResourceWithOptions(request: ListEmrAvailableResourceRequest, runtime: Util.RuntimeOptions): ListEmrAvailableResourceResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ClusterType"] = request.clusterType;
  query["DataDiskType"] = request.dataDiskType;
  query["DepositType"] = request.depositType;
  query["DestinationResource"] = request.destinationResource;
  query["EmrVersion"] = request.emrVersion;
  query["InstanceChargeType"] = request.instanceChargeType;
  query["InstanceType"] = request.instanceType;
  query["NetType"] = request.netType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SpotStrategy"] = request.spotStrategy;
  query["SystemDiskType"] = request.systemDiskType;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListEmrAvailableResource',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEmrAvailableResource(request: ListEmrAvailableResourceRequest): ListEmrAvailableResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEmrAvailableResourceWithOptions(request, runtime);
}

model ListEmrMainVersionRequest {
  emrVersion?: string(name='EmrVersion'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  stackName?: string(name='StackName'),
  stackVersion?: string(name='StackVersion'),
}

model ListEmrMainVersionResponseBody = {
  emrMainVersionList?: {
    emrMainVersion?: [ 
    {
      clusterTypeInfoList?: {
        clusterTypeInfo?: [ 
        {
          clusterType?: string(name='ClusterType'),
          serviceInfoList?: {
            serviceInfo?: [ 
            {
              display?: boolean(name='Display'),
              mandatory?: boolean(name='Mandatory'),
              serviceDisplayName?: string(name='ServiceDisplayName'),
              serviceDisplayVersion?: string(name='ServiceDisplayVersion'),
              serviceName?: string(name='ServiceName'),
              serviceVersion?: string(name='ServiceVersion'),
            }
          ](name='ServiceInfo')
          }(name='ServiceInfoList'),
        }
      ](name='ClusterTypeInfo')
      }(name='ClusterTypeInfoList'),
      clusterTypeWhiteUserList?: {
        clusterTypeWhiteUser?: [ 
        {
          clusterType?: string(name='ClusterType'),
          userId?: string(name='UserId'),
        }
      ](name='ClusterTypeWhiteUser')
      }(name='ClusterTypeWhiteUserList'),
      display?: boolean(name='Display'),
      ecmVersion?: boolean(name='EcmVersion'),
      emrVersion?: string(name='EmrVersion'),
      imageId?: string(name='ImageId'),
      publishType?: string(name='PublishType'),
      regionId?: string(name='RegionId'),
      stackName?: string(name='StackName'),
      stackVersion?: string(name='StackVersion'),
      whiteUserList?: {
        whiteUser?: [ string ](name='WhiteUser')
      }(name='WhiteUserList'),
    }
  ](name='EmrMainVersion')
  }(name='EmrMainVersionList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListEmrMainVersionResponse = {
  headers: map[string]string(name='headers'),
  body: ListEmrMainVersionResponseBody(name='body'),
}

async function listEmrMainVersionWithOptions(request: ListEmrMainVersionRequest, runtime: Util.RuntimeOptions): ListEmrMainVersionResponse {
  Util.validateModel(request);
  var query = {};
  query["EmrVersion"] = request.emrVersion;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StackName"] = request.stackName;
  query["StackVersion"] = request.stackVersion;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListEmrMainVersion',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEmrMainVersion(request: ListEmrMainVersionRequest): ListEmrMainVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEmrMainVersionWithOptions(request, runtime);
}

model ListExecutionPlanInstancesRequest {
  executionPlanIdList?: [ string ](name='ExecutionPlanIdList'),
  isDesc?: boolean(name='IsDesc'),
  onlyLastInstance?: boolean(name='OnlyLastInstance'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  statusList?: [ string ](name='StatusList'),
}

model ListExecutionPlanInstancesResponseBody = {
  executionPlanInstances?: {
    executionPlanInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      clusterType?: string(name='ClusterType'),
      executionPlanId?: string(name='ExecutionPlanId'),
      executionPlanName?: string(name='ExecutionPlanName'),
      id?: string(name='Id'),
      logEnable?: boolean(name='LogEnable'),
      logPath?: string(name='LogPath'),
      runTime?: int32(name='RunTime'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
      workflowApp?: string(name='WorkflowApp'),
    }
  ](name='ExecutionPlanInstance')
  }(name='ExecutionPlanInstances'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListExecutionPlanInstancesResponse = {
  headers: map[string]string(name='headers'),
  body: ListExecutionPlanInstancesResponseBody(name='body'),
}

async function listExecutionPlanInstancesWithOptions(request: ListExecutionPlanInstancesRequest, runtime: Util.RuntimeOptions): ListExecutionPlanInstancesResponse {
  Util.validateModel(request);
  var query = {};
  query["ExecutionPlanIdList"] = request.executionPlanIdList;
  query["IsDesc"] = request.isDesc;
  query["OnlyLastInstance"] = request.onlyLastInstance;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StatusList"] = request.statusList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListExecutionPlanInstances',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listExecutionPlanInstances(request: ListExecutionPlanInstancesRequest): ListExecutionPlanInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listExecutionPlanInstancesWithOptions(request, runtime);
}

model ListFlowRequest {
  clusterId?: string(name='ClusterId'),
  id?: string(name='Id'),
  jobId?: string(name='JobId'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  periodic?: boolean(name='Periodic'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  status?: string(name='Status'),
}

model ListFlowResponseBody = {
  flow?: {
    flow?: [ 
    {
      alertConf?: string(name='AlertConf'),
      alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
      alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
      categoryId?: string(name='CategoryId'),
      clusterId?: string(name='ClusterId'),
      createCluster?: boolean(name='CreateCluster'),
      cronExpr?: string(name='CronExpr'),
      description?: string(name='Description'),
      endSchedule?: long(name='EndSchedule'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      graph?: string(name='Graph'),
      hostName?: string(name='HostName'),
      id?: string(name='Id'),
      name?: string(name='Name'),
      periodic?: boolean(name='Periodic'),
      projectId?: string(name='ProjectId'),
      startSchedule?: long(name='StartSchedule'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='Flow')
  }(name='Flow'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowResponseBody(name='body'),
}

async function listFlowWithOptions(request: ListFlowRequest, runtime: Util.RuntimeOptions): ListFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Id"] = request.id;
  query["JobId"] = request.jobId;
  query["Name"] = request.name;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["Periodic"] = request.periodic;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlow(request: ListFlowRequest): ListFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowWithOptions(request, runtime);
}

model ListFlowCategoryRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  parentId?: string(name='ParentId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  root?: boolean(name='Root'),
}

model ListFlowCategoryResponseBody = {
  categories?: {
    category?: [ 
    {
      categoryType?: string(name='CategoryType'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      id?: string(name='Id'),
      name?: string(name='Name'),
      objectId?: string(name='ObjectId'),
      objectType?: string(name='ObjectType'),
      parentId?: string(name='ParentId'),
      projectId?: string(name='ProjectId'),
      type?: string(name='Type'),
    }
  ](name='Category')
  }(name='Categories'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowCategoryResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowCategoryResponseBody(name='body'),
}

async function listFlowCategoryWithOptions(request: ListFlowCategoryRequest, runtime: Util.RuntimeOptions): ListFlowCategoryResponse {
  Util.validateModel(request);
  var query = {};
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ParentId"] = request.parentId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Root"] = request.root;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowCategory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowCategory(request: ListFlowCategoryRequest): ListFlowCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowCategoryWithOptions(request, runtime);
}

model ListFlowClusterRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model ListFlowClusterResponseBody = {
  clusters?: {
    clusterInfo?: [ 
    {
      chargeType?: string(name='ChargeType'),
      createResource?: string(name='CreateResource'),
      createTime?: long(name='CreateTime'),
      expiredTime?: long(name='ExpiredTime'),
      failReason?: {
        errorCode?: string(name='ErrorCode'),
        errorMsg?: string(name='ErrorMsg'),
        requestId?: string(name='RequestId'),
      }(name='FailReason'),
      hasUncompletedOrder?: boolean(name='HasUncompletedOrder'),
      id?: string(name='Id'),
      k8sClusterId?: string(name='K8sClusterId'),
      name?: string(name='Name'),
      orderList?: string(name='OrderList'),
      orderTaskInfo?: {
        currentCount?: int32(name='CurrentCount'),
        orderIdList?: string(name='OrderIdList'),
        targetCount?: int32(name='TargetCount'),
      }(name='OrderTaskInfo'),
      period?: int32(name='Period'),
      runningTime?: int32(name='RunningTime'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='ClusterInfo')
  }(name='Clusters'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListFlowClusterResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowClusterResponseBody(name='body'),
}

async function listFlowClusterWithOptions(request: ListFlowClusterRequest, runtime: Util.RuntimeOptions): ListFlowClusterResponse {
  Util.validateModel(request);
  var query = {};
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowCluster',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowCluster(request: ListFlowClusterRequest): ListFlowClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowClusterWithOptions(request, runtime);
}

model ListFlowClusterAllRequest {
  productType?: string(name='ProductType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model ListFlowClusterAllResponseBody = {
  clusters?: {
    clusterInfo?: [ 
    {
      chargeType?: string(name='ChargeType'),
      createResource?: string(name='CreateResource'),
      createTime?: long(name='CreateTime'),
      expiredTime?: long(name='ExpiredTime'),
      failReason?: {
        errorCode?: string(name='ErrorCode'),
        errorMsg?: string(name='ErrorMsg'),
        requestId?: string(name='RequestId'),
      }(name='FailReason'),
      hasUncompletedOrder?: boolean(name='HasUncompletedOrder'),
      id?: string(name='Id'),
      k8sClusterId?: string(name='K8sClusterId'),
      name?: string(name='Name'),
      orderList?: string(name='OrderList'),
      orderTaskInfo?: {
        currentCount?: int32(name='CurrentCount'),
        orderIdList?: string(name='OrderIdList'),
        targetCount?: int32(name='TargetCount'),
      }(name='OrderTaskInfo'),
      period?: int32(name='Period'),
      runningTime?: int32(name='RunningTime'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='ClusterInfo')
  }(name='Clusters'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListFlowClusterAllResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowClusterAllResponseBody(name='body'),
}

async function listFlowClusterAllWithOptions(request: ListFlowClusterAllRequest, runtime: Util.RuntimeOptions): ListFlowClusterAllResponse {
  Util.validateModel(request);
  var query = {};
  query["ProductType"] = request.productType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowClusterAll',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowClusterAll(request: ListFlowClusterAllRequest): ListFlowClusterAllResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowClusterAllWithOptions(request, runtime);
}

model ListFlowClusterAllHostsRequest {
  clusterId?: string(name='ClusterId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model ListFlowClusterAllHostsResponseBody = {
  hostList?: {
    host?: [ 
    {
      cpu?: int32(name='Cpu'),
      hostId?: string(name='HostId'),
      hostInstanceId?: string(name='HostInstanceId'),
      hostName?: string(name='HostName'),
      instanceType?: string(name='InstanceType'),
      memory?: int32(name='Memory'),
      privateIp?: string(name='PrivateIp'),
      publicIp?: string(name='PublicIp'),
      role?: string(name='Role'),
      serialNumber?: string(name='SerialNumber'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='Host')
  }(name='HostList'),
  requestId?: string(name='RequestId'),
}

model ListFlowClusterAllHostsResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowClusterAllHostsResponseBody(name='body'),
}

async function listFlowClusterAllHostsWithOptions(request: ListFlowClusterAllHostsRequest, runtime: Util.RuntimeOptions): ListFlowClusterAllHostsResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowClusterAllHosts',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowClusterAllHosts(request: ListFlowClusterAllHostsRequest): ListFlowClusterAllHostsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowClusterAllHostsWithOptions(request, runtime);
}

model ListFlowClusterHostRequest {
  clusterId?: string(name='ClusterId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model ListFlowClusterHostResponseBody = {
  hostList?: {
    host?: [ 
    {
      cpu?: int32(name='Cpu'),
      hostId?: string(name='HostId'),
      hostInstanceId?: string(name='HostInstanceId'),
      hostName?: string(name='HostName'),
      instanceType?: string(name='InstanceType'),
      memory?: int32(name='Memory'),
      privateIp?: string(name='PrivateIp'),
      publicIp?: string(name='PublicIp'),
      role?: string(name='Role'),
      serialNumber?: string(name='SerialNumber'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='Host')
  }(name='HostList'),
  requestId?: string(name='RequestId'),
}

model ListFlowClusterHostResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowClusterHostResponseBody(name='body'),
}

async function listFlowClusterHostWithOptions(request: ListFlowClusterHostRequest, runtime: Util.RuntimeOptions): ListFlowClusterHostResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowClusterHost',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowClusterHost(request: ListFlowClusterHostRequest): ListFlowClusterHostResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowClusterHostWithOptions(request, runtime);
}

model ListFlowInstanceRequest {
  flowId?: string(name='FlowId'),
  flowName?: string(name='FlowName'),
  id?: string(name='Id'),
  instanceId?: string(name='InstanceId'),
  nodeInstanceId?: string(name='NodeInstanceId'),
  orderBy?: string(name='OrderBy'),
  orderType?: string(name='OrderType'),
  owner?: string(name='Owner'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  statusList?: [ string ](name='StatusList'),
  timeRange?: string(name='TimeRange'),
}

model ListFlowInstanceResponseBody = {
  flowInstances?: {
    flowInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      duration?: long(name='Duration'),
      endTime?: long(name='EndTime'),
      flowId?: string(name='FlowId'),
      flowName?: string(name='FlowName'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hasNodeFailed?: boolean(name='HasNodeFailed'),
      id?: string(name='Id'),
      owner?: string(name='Owner'),
      projectId?: string(name='ProjectId'),
      scheduleTime?: long(name='ScheduleTime'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
    }
  ](name='FlowInstance')
  }(name='FlowInstances'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowInstanceResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowInstanceResponseBody(name='body'),
}

async function listFlowInstanceWithOptions(request: ListFlowInstanceRequest, runtime: Util.RuntimeOptions): ListFlowInstanceResponse {
  Util.validateModel(request);
  var query = {};
  query["FlowId"] = request.flowId;
  query["FlowName"] = request.flowName;
  query["Id"] = request.id;
  query["InstanceId"] = request.instanceId;
  query["NodeInstanceId"] = request.nodeInstanceId;
  query["OrderBy"] = request.orderBy;
  query["OrderType"] = request.orderType;
  query["Owner"] = request.owner;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StatusList"] = request.statusList;
  query["TimeRange"] = request.timeRange;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowInstance',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowInstance(request: ListFlowInstanceRequest): ListFlowInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowInstanceWithOptions(request, runtime);
}

model ListFlowJobRequest {
  adhoc?: boolean(name='Adhoc'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  type?: string(name='Type'),
}

model ListFlowJobResponseBody = {
  jobList?: {
    job?: [ 
    {
      adhoc?: string(name='Adhoc'),
      alertConf?: string(name='AlertConf'),
      categoryId?: string(name='CategoryId'),
      customVariables?: string(name='CustomVariables'),
      description?: string(name='Description'),
      envConf?: string(name='EnvConf'),
      failAct?: string(name='FailAct'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      id?: string(name='Id'),
      lastInstanceDetail?: string(name='LastInstanceDetail'),
      maxRetry?: int32(name='MaxRetry'),
      monitorConf?: string(name='MonitorConf'),
      name?: string(name='Name'),
      paramConf?: string(name='ParamConf'),
      params?: string(name='Params'),
      resourceList?: {
        resource?: [ 
        {
          alias?: string(name='Alias'),
          path?: string(name='Path'),
        }
      ](name='Resource')
      }(name='ResourceList'),
      retryInterval?: long(name='RetryInterval'),
      runConf?: string(name='RunConf'),
      type?: string(name='Type'),
      mode?: string(name='mode'),
    }
  ](name='Job')
  }(name='JobList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowJobResponseBody(name='body'),
}

async function listFlowJobWithOptions(request: ListFlowJobRequest, runtime: Util.RuntimeOptions): ListFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["Adhoc"] = request.adhoc;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowJob(request: ListFlowJobRequest): ListFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowJobWithOptions(request, runtime);
}

model ListFlowJobHistoryRequest {
  id?: string(name='Id'),
  instanceId?: string(name='InstanceId'),
  jobType?: string(name='JobType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  statusList?: [ string ](name='StatusList'),
  timeRange?: string(name='TimeRange'),
}

model ListFlowJobHistoryResponseBody = {
  nodeInstances?: {
    nodeInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      endTime?: long(name='EndTime'),
      envConf?: string(name='EnvConf'),
      externalId?: string(name='ExternalId'),
      externalInfo?: string(name='ExternalInfo'),
      externalStatus?: string(name='ExternalStatus'),
      failAct?: string(name='FailAct'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hostName?: string(name='HostName'),
      id?: string(name='Id'),
      jobId?: string(name='JobId'),
      jobName?: string(name='JobName'),
      jobParams?: string(name='JobParams'),
      jobType?: string(name='JobType'),
      maxRetry?: int32(name='MaxRetry'),
      nodeName?: string(name='NodeName'),
      paramConf?: string(name='ParamConf'),
      projectId?: string(name='ProjectId'),
      retries?: int32(name='Retries'),
      retryInterval?: long(name='RetryInterval'),
      runConf?: string(name='RunConf'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
      type?: string(name='Type'),
      pending?: boolean(name='pending'),
    }
  ](name='NodeInstance')
  }(name='NodeInstances'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowJobHistoryResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowJobHistoryResponseBody(name='body'),
}

async function listFlowJobHistoryWithOptions(request: ListFlowJobHistoryRequest, runtime: Util.RuntimeOptions): ListFlowJobHistoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["InstanceId"] = request.instanceId;
  query["JobType"] = request.jobType;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StatusList"] = request.statusList;
  query["TimeRange"] = request.timeRange;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowJobHistory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowJobHistory(request: ListFlowJobHistoryRequest): ListFlowJobHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowJobHistoryWithOptions(request, runtime);
}

model ListFlowNodeInstanceRequest {
  orderBy?: string(name='OrderBy'),
  orderType?: string(name='OrderType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  startTime?: long(name='StartTime'),
  statusList?: [ string ](name='StatusList'),
}

model ListFlowNodeInstanceResponseBody = {
  flowNodeInstances?: {
    flowNodeInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      duration?: long(name='Duration'),
      endTime?: long(name='EndTime'),
      externalChildIds?: string(name='ExternalChildIds'),
      externalId?: string(name='ExternalId'),
      externalInfo?: string(name='ExternalInfo'),
      externalStatus?: string(name='ExternalStatus'),
      externalSubId?: string(name='ExternalSubId'),
      failAct?: string(name='FailAct'),
      flowId?: string(name='FlowId'),
      flowInstanceId?: string(name='FlowInstanceId'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hostName?: string(name='HostName'),
      id?: string(name='Id'),
      jobId?: string(name='JobId'),
      jobName?: string(name='JobName'),
      jobParams?: string(name='JobParams'),
      jobType?: string(name='JobType'),
      maxRetry?: string(name='MaxRetry'),
      nodeName?: string(name='NodeName'),
      pending?: boolean(name='Pending'),
      projectId?: string(name='ProjectId'),
      retries?: int32(name='Retries'),
      retryInterval?: string(name='RetryInterval'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
      type?: string(name='Type'),
    }
  ](name='FlowNodeInstance')
  }(name='FlowNodeInstances'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowNodeInstanceResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowNodeInstanceResponseBody(name='body'),
}

async function listFlowNodeInstanceWithOptions(request: ListFlowNodeInstanceRequest, runtime: Util.RuntimeOptions): ListFlowNodeInstanceResponse {
  Util.validateModel(request);
  var query = {};
  query["OrderBy"] = request.orderBy;
  query["OrderType"] = request.orderType;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["StartTime"] = request.startTime;
  query["StatusList"] = request.statusList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowNodeInstance',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowNodeInstance(request: ListFlowNodeInstanceRequest): ListFlowNodeInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowNodeInstanceWithOptions(request, runtime);
}

model ListFlowNodeInstanceContainerStatusRequest {
  nodeInstanceId?: string(name='NodeInstanceId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ListFlowNodeInstanceContainerStatusResponseBody = {
  containerStatusList?: {
    containerStatus?: [ 
    {
      applicationId?: string(name='ApplicationId'),
      containerId?: string(name='ContainerId'),
      hostName?: string(name='HostName'),
      status?: string(name='Status'),
    }
  ](name='ContainerStatus')
  }(name='ContainerStatusList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowNodeInstanceContainerStatusResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowNodeInstanceContainerStatusResponseBody(name='body'),
}

async function listFlowNodeInstanceContainerStatusWithOptions(request: ListFlowNodeInstanceContainerStatusRequest, runtime: Util.RuntimeOptions): ListFlowNodeInstanceContainerStatusResponse {
  Util.validateModel(request);
  var query = {};
  query["NodeInstanceId"] = request.nodeInstanceId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowNodeInstanceContainerStatus',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowNodeInstanceContainerStatus(request: ListFlowNodeInstanceContainerStatusRequest): ListFlowNodeInstanceContainerStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowNodeInstanceContainerStatusWithOptions(request, runtime);
}

model ListFlowNodeSqlResultRequest {
  length?: int32(name='Length'),
  nodeInstanceId?: string(name='NodeInstanceId'),
  offset?: int32(name='Offset'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  sqlIndex?: int32(name='SqlIndex'),
}

model ListFlowNodeSqlResultResponseBody = {
  end?: boolean(name='End'),
  headerList?: {
    header?: [ string ](name='Header')
  }(name='HeaderList'),
  requestId?: string(name='RequestId'),
  rowList?: {
    row?: [ 
    {
      rowIndex?: int32(name='RowIndex'),
      rowItemList?: {
        rowItem?: [ string ](name='rowItem')
      }(name='RowItemList'),
    }
  ](name='Row')
  }(name='RowList'),
}

model ListFlowNodeSqlResultResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowNodeSqlResultResponseBody(name='body'),
}

async function listFlowNodeSqlResultWithOptions(request: ListFlowNodeSqlResultRequest, runtime: Util.RuntimeOptions): ListFlowNodeSqlResultResponse {
  Util.validateModel(request);
  var query = {};
  query["Length"] = request.length;
  query["NodeInstanceId"] = request.nodeInstanceId;
  query["Offset"] = request.offset;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["SqlIndex"] = request.sqlIndex;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowNodeSqlResult',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowNodeSqlResult(request: ListFlowNodeSqlResultRequest): ListFlowNodeSqlResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowNodeSqlResultWithOptions(request, runtime);
}

model ListFlowProjectRequest {
  name?: string(name='Name'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  productType?: string(name='ProductType'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
}

model ListFlowProjectResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projects?: {
    project?: [ 
    {
      description?: string(name='Description'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      id?: string(name='Id'),
      name?: string(name='Name'),
      userId?: string(name='UserId'),
    }
  ](name='Project')
  }(name='Projects'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowProjectResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowProjectResponseBody(name='body'),
}

async function listFlowProjectWithOptions(request: ListFlowProjectRequest, runtime: Util.RuntimeOptions): ListFlowProjectResponse {
  Util.validateModel(request);
  var query = {};
  query["Name"] = request.name;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProductType"] = request.productType;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowProject',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowProject(request: ListFlowProjectRequest): ListFlowProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowProjectWithOptions(request, runtime);
}

model ListFlowProjectClusterSettingRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ListFlowProjectClusterSettingResponseBody = {
  clusterSettings?: {
    clusterSetting?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      defaultQueue?: string(name='DefaultQueue'),
      defaultUser?: string(name='DefaultUser'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      hostList?: {
        host?: [ string ](name='Host')
      }(name='HostList'),
      k8sClusterId?: string(name='K8sClusterId'),
      projectId?: string(name='ProjectId'),
      queueList?: {
        queue?: [ string ](name='Queue')
      }(name='QueueList'),
      userList?: {
        user?: [ string ](name='User')
      }(name='UserList'),
    }
  ](name='ClusterSetting')
  }(name='ClusterSettings'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListFlowProjectClusterSettingResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowProjectClusterSettingResponseBody(name='body'),
}

async function listFlowProjectClusterSettingWithOptions(request: ListFlowProjectClusterSettingRequest, runtime: Util.RuntimeOptions): ListFlowProjectClusterSettingResponse {
  Util.validateModel(request);
  var query = {};
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowProjectClusterSetting',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowProjectClusterSetting(request: ListFlowProjectClusterSettingRequest): ListFlowProjectClusterSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowProjectClusterSettingWithOptions(request, runtime);
}

model ListFlowProjectUserRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ListFlowProjectUserResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
  users?: {
    user?: [ 
    {
      accountUserId?: string(name='AccountUserId'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      ownerId?: string(name='OwnerId'),
      projectId?: string(name='ProjectId'),
      userName?: string(name='UserName'),
    }
  ](name='User')
  }(name='Users'),
}

model ListFlowProjectUserResponse = {
  headers: map[string]string(name='headers'),
  body: ListFlowProjectUserResponseBody(name='body'),
}

async function listFlowProjectUserWithOptions(request: ListFlowProjectUserRequest, runtime: Util.RuntimeOptions): ListFlowProjectUserResponse {
  Util.validateModel(request);
  var query = {};
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListFlowProjectUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFlowProjectUser(request: ListFlowProjectUserRequest): ListFlowProjectUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFlowProjectUserWithOptions(request, runtime);
}

model ListJobExecutionInstancesRequest {
  executionPlanInstanceId?: string(name='ExecutionPlanInstanceId'),
  isDesc?: boolean(name='IsDesc'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListJobExecutionInstancesResponseBody = {
  jobInstances?: {
    jobInstance?: [ 
    {
      clusterId?: string(name='ClusterId'),
      id?: string(name='Id'),
      jobId?: string(name='JobId'),
      jobName?: string(name='JobName'),
      jobType?: string(name='JobType'),
      retryInfo?: string(name='RetryInfo'),
      runTime?: int32(name='RunTime'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
    }
  ](name='JobInstance')
  }(name='JobInstances'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListJobExecutionInstancesResponse = {
  headers: map[string]string(name='headers'),
  body: ListJobExecutionInstancesResponseBody(name='body'),
}

async function listJobExecutionInstancesWithOptions(request: ListJobExecutionInstancesRequest, runtime: Util.RuntimeOptions): ListJobExecutionInstancesResponse {
  Util.validateModel(request);
  var query = {};
  query["ExecutionPlanInstanceId"] = request.executionPlanInstanceId;
  query["IsDesc"] = request.isDesc;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListJobExecutionInstances',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listJobExecutionInstances(request: ListJobExecutionInstancesRequest): ListJobExecutionInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobExecutionInstancesWithOptions(request, runtime);
}

model ListJobsRequest {
  isDesc?: boolean(name='IsDesc'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  queryString?: string(name='QueryString'),
  queryType?: string(name='QueryType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListJobsResponseBody = {
  jobs?: {
    jobInfo?: [ 
    {
      failAct?: string(name='FailAct'),
      id?: string(name='Id'),
      maxRetry?: int32(name='MaxRetry'),
      name?: string(name='Name'),
      retryInterval?: int32(name='RetryInterval'),
      runParameter?: string(name='RunParameter'),
      type?: string(name='Type'),
    }
  ](name='JobInfo')
  }(name='Jobs'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListJobsResponse = {
  headers: map[string]string(name='headers'),
  body: ListJobsResponseBody(name='body'),
}

async function listJobsWithOptions(request: ListJobsRequest, runtime: Util.RuntimeOptions): ListJobsResponse {
  Util.validateModel(request);
  var query = {};
  query["IsDesc"] = request.isDesc;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["QueryString"] = request.queryString;
  query["QueryType"] = request.queryType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListJobs',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listJobs(request: ListJobsRequest): ListJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobsWithOptions(request, runtime);
}

model ListLibrariesRequest {
  clusterBizId?: string(name='ClusterBizId'),
  currentSize?: int32(name='CurrentSize'),
  limit?: int32(name='Limit'),
  orderField?: string(name='OrderField'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListLibrariesResponseBody = {
  items?: {
    item?: [ 
    {
      bizId?: string(name='BizId'),
      createTime?: long(name='CreateTime'),
      libraryVersion?: string(name='LibraryVersion'),
      name?: string(name='Name'),
      properties?: string(name='Properties'),
      scope?: string(name='Scope'),
      sourceLocation?: string(name='SourceLocation'),
      sourceType?: string(name='SourceType'),
      type?: string(name='Type'),
      userId?: string(name='UserId'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListLibrariesResponse = {
  headers: map[string]string(name='headers'),
  body: ListLibrariesResponseBody(name='body'),
}

async function listLibrariesWithOptions(request: ListLibrariesRequest, runtime: Util.RuntimeOptions): ListLibrariesResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizId"] = request.clusterBizId;
  query["CurrentSize"] = request.currentSize;
  query["Limit"] = request.limit;
  query["OrderField"] = request.orderField;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListLibraries',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLibraries(request: ListLibrariesRequest): ListLibrariesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLibrariesWithOptions(request, runtime);
}

model ListLibraryInstallTasksRequest {
  clusterBizId?: string(name='ClusterBizId'),
  currentSize?: int32(name='CurrentSize'),
  libraryBizId?: string(name='LibraryBizId'),
  limit?: int32(name='Limit'),
  orderField?: string(name='OrderField'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListLibraryInstallTasksResponseBody = {
  items?: {
    item?: [ 
    {
      clusterBizId?: string(name='ClusterBizId'),
      detail?: string(name='Detail'),
      endTime?: long(name='EndTime'),
      executeTime?: long(name='ExecuteTime'),
      hostname?: string(name='Hostname'),
      libraryBizId?: string(name='LibraryBizId'),
      startTime?: long(name='StartTime'),
      taskGroupId?: string(name='TaskGroupId'),
      taskId?: string(name='TaskId'),
      taskProcess?: int32(name='TaskProcess'),
      taskStatus?: string(name='TaskStatus'),
      taskType?: string(name='TaskType'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListLibraryInstallTasksResponse = {
  headers: map[string]string(name='headers'),
  body: ListLibraryInstallTasksResponseBody(name='body'),
}

async function listLibraryInstallTasksWithOptions(request: ListLibraryInstallTasksRequest, runtime: Util.RuntimeOptions): ListLibraryInstallTasksResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizId"] = request.clusterBizId;
  query["CurrentSize"] = request.currentSize;
  query["LibraryBizId"] = request.libraryBizId;
  query["Limit"] = request.limit;
  query["OrderField"] = request.orderField;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListLibraryInstallTasks',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLibraryInstallTasks(request: ListLibraryInstallTasksRequest): ListLibraryInstallTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLibraryInstallTasksWithOptions(request, runtime);
}

model ListLibraryStatusRequest {
  clusterBizId?: string(name='ClusterBizId'),
  currentSize?: int32(name='CurrentSize'),
  libraryBizId?: string(name='LibraryBizId'),
  limit?: int32(name='Limit'),
  orderField?: string(name='OrderField'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListLibraryStatusResponseBody = {
  items?: {
    item?: [ 
    {
      clusterBizId?: string(name='ClusterBizId'),
      clusterName?: string(name='ClusterName'),
      libraryBizId?: string(name='LibraryBizId'),
      libraryName?: string(name='LibraryName'),
      status?: string(name='Status'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListLibraryStatusResponse = {
  headers: map[string]string(name='headers'),
  body: ListLibraryStatusResponseBody(name='body'),
}

async function listLibraryStatusWithOptions(request: ListLibraryStatusRequest, runtime: Util.RuntimeOptions): ListLibraryStatusResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizId"] = request.clusterBizId;
  query["CurrentSize"] = request.currentSize;
  query["LibraryBizId"] = request.libraryBizId;
  query["Limit"] = request.limit;
  query["OrderField"] = request.orderField;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListLibraryStatus',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLibraryStatus(request: ListLibraryStatusRequest): ListLibraryStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLibraryStatusWithOptions(request, runtime);
}

model ListLocalDiskComponentInfoRequest {
  clusterId?: string(name='ClusterId'),
  instanceId?: string(name='InstanceId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListLocalDiskComponentInfoResponseBody = {
  componentInfoList?: {
    componentInfo?: [ 
    {
      apmMetrics?: {
        apmMetric?: [ string ](name='ApmMetric')
      }(name='ApmMetrics'),
      componentDisplayName?: string(name='ComponentDisplayName'),
      componentName?: string(name='ComponentName'),
      isolateWarningMsg?: string(name='IsolateWarningMsg'),
      mountParams?: {
        mountParam?: [ 
        {
          defaultValue?: string(name='DefaultValue'),
          key?: string(name='Key'),
          max?: int32(name='Max'),
          min?: int32(name='Min'),
          name?: string(name='Name'),
          options?: {
            option?: [ string ](name='Option')
          }(name='Options'),
          tips?: string(name='Tips'),
          unit?: string(name='Unit'),
          valueType?: string(name='ValueType'),
        }
      ](name='MountParam')
      }(name='MountParams'),
      mountWarningMsg?: string(name='MountWarningMsg'),
      rebootWarningMsg?: string(name='RebootWarningMsg'),
      serviceDisplayName?: string(name='ServiceDisplayName'),
      serviceName?: string(name='ServiceName'),
      supportDiskHotSwap?: boolean(name='SupportDiskHotSwap'),
    }
  ](name='ComponentInfo')
  }(name='ComponentInfoList'),
  requestId?: string(name='RequestId'),
}

model ListLocalDiskComponentInfoResponse = {
  headers: map[string]string(name='headers'),
  body: ListLocalDiskComponentInfoResponseBody(name='body'),
}

async function listLocalDiskComponentInfoWithOptions(request: ListLocalDiskComponentInfoRequest, runtime: Util.RuntimeOptions): ListLocalDiskComponentInfoResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["InstanceId"] = request.instanceId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListLocalDiskComponentInfo',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLocalDiskComponentInfo(request: ListLocalDiskComponentInfoRequest): ListLocalDiskComponentInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLocalDiskComponentInfoWithOptions(request, runtime);
}

model ListResourcePoolRequest {
  clusterId?: string(name='ClusterId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  poolType?: string(name='PoolType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListResourcePoolResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  poolInfoList?: {
    poolInfo?: [ 
    {
      ecmResourcePool?: {
        active?: boolean(name='Active'),
        id?: long(name='Id'),
        name?: string(name='Name'),
        note?: string(name='Note'),
        poolType?: string(name='PoolType'),
        userId?: string(name='UserId'),
        yarnSiteConfig?: string(name='YarnSiteConfig'),
      }(name='EcmResourcePool'),
      ecmResourcePoolConfigList?: {
        ecmResourcePoolConfig?: [ 
        {
          category?: string(name='Category'),
          configKey?: string(name='ConfigKey'),
          configType?: string(name='ConfigType'),
          configValue?: string(name='ConfigValue'),
          id?: long(name='Id'),
          note?: string(name='Note'),
          status?: string(name='Status'),
        }
      ](name='EcmResourcePoolConfig')
      }(name='EcmResourcePoolConfigList'),
      queueList?: {
        queue?: [ 
        {
          ecmResourcePoolConfigList?: {
            ecmResourcePoolConfig?: [ 
            {
              category?: string(name='Category'),
              configKey?: string(name='ConfigKey'),
              configType?: string(name='ConfigType'),
              configValue?: string(name='ConfigValue'),
              id?: long(name='Id'),
              note?: string(name='Note'),
              status?: string(name='Status'),
            }
          ](name='EcmResourcePoolConfig')
          }(name='EcmResourcePoolConfigList'),
          ecmResourceQueue?: {
            id?: long(name='Id'),
            leaf?: boolean(name='Leaf'),
            name?: string(name='Name'),
            parentQueueId?: long(name='ParentQueueId'),
            qualifiedName?: string(name='QualifiedName'),
            queueType?: string(name='QueueType'),
            resourcePoolId?: long(name='ResourcePoolId'),
            status?: string(name='Status'),
            userId?: string(name='UserId'),
          }(name='EcmResourceQueue'),
        }
      ](name='Queue')
      }(name='QueueList'),
    }
  ](name='PoolInfo')
  }(name='PoolInfoList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListResourcePoolResponse = {
  headers: map[string]string(name='headers'),
  body: ListResourcePoolResponseBody(name='body'),
}

async function listResourcePoolWithOptions(request: ListResourcePoolRequest, runtime: Util.RuntimeOptions): ListResourcePoolResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["PoolType"] = request.poolType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListResourcePool',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listResourcePool(request: ListResourcePoolRequest): ListResourcePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourcePoolWithOptions(request, runtime);
}

model ListRolesRequest {
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
}

model ListRolesResponseBody = {
  data?: {
    roleDTO?: [ 
    {
      description?: string(name='Description'),
      gmtCreate?: string(name='GmtCreate'),
      gmtModified?: string(name='GmtModified'),
      id?: long(name='Id'),
      name?: string(name='Name'),
      resourceType?: string(name='ResourceType'),
    }
  ](name='roleDTO')
  }(name='Data'),
  paging?: boolean(name='Paging'),
  requestId?: string(name='RequestId'),
}

model ListRolesResponse = {
  headers: map[string]string(name='headers'),
  body: ListRolesResponseBody(name='body'),
}

async function listRolesWithOptions(request: ListRolesRequest, runtime: Util.RuntimeOptions): ListRolesResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListRoles',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listRoles(request: ListRolesRequest): ListRolesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRolesWithOptions(request, runtime);
}

model ListScalingActivityV2Request {
  clusterBizId?: string(name='ClusterBizId'),
  currentSize?: int32(name='CurrentSize'),
  hostGroupId?: string(name='HostGroupId'),
  hostGroupName?: string(name='HostGroupName'),
  limit?: int32(name='Limit'),
  orderField?: string(name='OrderField'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
  scalingRuleName?: string(name='ScalingRuleName'),
  status?: string(name='Status'),
}

model ListScalingActivityV2ResponseBody = {
  items?: {
    item?: [ 
    {
      bizId?: string(name='BizId'),
      cause?: string(name='Cause'),
      description?: string(name='Description'),
      endTime?: long(name='EndTime'),
      expectNum?: int32(name='ExpectNum'),
      hostGroupBizId?: string(name='HostGroupBizId'),
      hostGroupName?: string(name='HostGroupName'),
      instanceIds?: string(name='InstanceIds'),
      scalingRuleId?: string(name='ScalingRuleId'),
      scalingRuleName?: string(name='ScalingRuleName'),
      startTime?: long(name='StartTime'),
      status?: string(name='Status'),
      totalCapacity?: int32(name='TotalCapacity'),
      transition?: string(name='Transition'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListScalingActivityV2Response = {
  headers: map[string]string(name='headers'),
  body: ListScalingActivityV2ResponseBody(name='body'),
}

async function listScalingActivityV2WithOptions(request: ListScalingActivityV2Request, runtime: Util.RuntimeOptions): ListScalingActivityV2Response {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizId"] = request.clusterBizId;
  query["CurrentSize"] = request.currentSize;
  query["HostGroupId"] = request.hostGroupId;
  query["HostGroupName"] = request.hostGroupName;
  query["Limit"] = request.limit;
  query["OrderField"] = request.orderField;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  query["ScalingRuleName"] = request.scalingRuleName;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListScalingActivityV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listScalingActivityV2(request: ListScalingActivityV2Request): ListScalingActivityV2Response {
  var runtime = new Util.RuntimeOptions{};
  return listScalingActivityV2WithOptions(request, runtime);
}

model ListScalingConfigItemV2Request {
  configItemType?: string(name='ConfigItemType'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model ListScalingConfigItemV2ResponseBody = {
  items?: {
    item?: [ 
    {
      configItemInformation?: string(name='ConfigItemInformation'),
      configItemType?: string(name='ConfigItemType'),
      scalingConfigItemBizId?: string(name='ScalingConfigItemBizId'),
      scalingGroupBizId?: string(name='ScalingGroupBizId'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListScalingConfigItemV2Response = {
  headers: map[string]string(name='headers'),
  body: ListScalingConfigItemV2ResponseBody(name='body'),
}

async function listScalingConfigItemV2WithOptions(request: ListScalingConfigItemV2Request, runtime: Util.RuntimeOptions): ListScalingConfigItemV2Response {
  Util.validateModel(request);
  var query = {};
  query["ConfigItemType"] = request.configItemType;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListScalingConfigItemV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listScalingConfigItemV2(request: ListScalingConfigItemV2Request): ListScalingConfigItemV2Response {
  var runtime = new Util.RuntimeOptions{};
  return listScalingConfigItemV2WithOptions(request, runtime);
}

model ListScalingGroupV2Request {
  clusterBizId?: string(name='ClusterBizId'),
  currentSize?: int32(name='CurrentSize'),
  limit?: int32(name='Limit'),
  orderField?: string(name='OrderField'),
  orderMode?: string(name='OrderMode'),
  pageCount?: int32(name='PageCount'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListScalingGroupV2ResponseBody = {
  items?: {
    item?: [ 
    {
      activeStatus?: string(name='ActiveStatus'),
      description?: string(name='Description'),
      hostGroupBizId?: string(name='HostGroupBizId'),
      name?: string(name='Name'),
      scalingGroupId?: string(name='ScalingGroupId'),
      scalingInMode?: string(name='ScalingInMode'),
      scalingMaxSize?: int32(name='ScalingMaxSize'),
      scalingMinSize?: int32(name='ScalingMinSize'),
    }
  ](name='Item')
  }(name='Items'),
  nextToken?: string(name='NextToken'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListScalingGroupV2Response = {
  headers: map[string]string(name='headers'),
  body: ListScalingGroupV2ResponseBody(name='body'),
}

async function listScalingGroupV2WithOptions(request: ListScalingGroupV2Request, runtime: Util.RuntimeOptions): ListScalingGroupV2Response {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizId"] = request.clusterBizId;
  query["CurrentSize"] = request.currentSize;
  query["Limit"] = request.limit;
  query["OrderField"] = request.orderField;
  query["OrderMode"] = request.orderMode;
  query["PageCount"] = request.pageCount;
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListScalingGroupV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listScalingGroupV2(request: ListScalingGroupV2Request): ListScalingGroupV2Response {
  var runtime = new Util.RuntimeOptions{};
  return listScalingGroupV2WithOptions(request, runtime);
}

model ListSecurityGroupRequest {
  depositType?: string(name='DepositType'),
  netType?: string(name='NetType'),
  productType?: string(name='ProductType'),
  regionId?: string(name='RegionId'),
  vpcId?: string(name='VpcId'),
}

model ListSecurityGroupResponseBody = {
  requestId?: string(name='RequestId'),
  securityGroupList?: {
    securityGroup?: [ 
    {
      availableInstanceAmount?: int32(name='AvailableInstanceAmount'),
      creationTime?: string(name='CreationTime'),
      description?: string(name='Description'),
      ecsCount?: int32(name='EcsCount'),
      securityGroupId?: string(name='SecurityGroupId'),
      securityGroupName?: string(name='SecurityGroupName'),
      securityGroupType?: string(name='SecurityGroupType'),
      vpcId?: string(name='VpcId'),
    }
  ](name='SecurityGroup')
  }(name='SecurityGroupList'),
}

model ListSecurityGroupResponse = {
  headers: map[string]string(name='headers'),
  body: ListSecurityGroupResponseBody(name='body'),
}

async function listSecurityGroupWithOptions(request: ListSecurityGroupRequest, runtime: Util.RuntimeOptions): ListSecurityGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["DepositType"] = request.depositType;
  query["NetType"] = request.netType;
  query["ProductType"] = request.productType;
  query["RegionId"] = request.regionId;
  query["VpcId"] = request.vpcId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListSecurityGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSecurityGroup(request: ListSecurityGroupRequest): ListSecurityGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSecurityGroupWithOptions(request, runtime);
}

model ListStackRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  stackName?: string(name='StackName'),
  stackVersion?: string(name='StackVersion'),
}

model ListStackResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  stackList?: {
    stack?: [ 
    {
      name?: string(name='Name'),
      status?: string(name='Status'),
      version?: string(name='Version'),
    }
  ](name='Stack')
  }(name='StackList'),
  totalCount?: int32(name='TotalCount'),
}

model ListStackResponse = {
  headers: map[string]string(name='headers'),
  body: ListStackResponseBody(name='body'),
}

async function listStackWithOptions(request: ListStackRequest, runtime: Util.RuntimeOptions): ListStackResponse {
  Util.validateModel(request);
  var query = {};
  query["PageNumber"] = request.pageNumber;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["StackName"] = request.stackName;
  query["StackVersion"] = request.stackVersion;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListStack',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listStack(request: ListStackRequest): ListStackResponse {
  var runtime = new Util.RuntimeOptions{};
  return listStackWithOptions(request, runtime);
}

model ListTagKeysRequest {
  category?: string(name='Category'),
  nextToken?: string(name='NextToken'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
  scope?: string(name='Scope'),
}

model ListTagKeysResponseBody = {
  code?: string(name='Code'),
  keys?: {
    key?: [ string ](name='Key')
  }(name='Keys'),
  message?: string(name='Message'),
  nextToken?: string(name='NextToken'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListTagKeysResponse = {
  headers: map[string]string(name='headers'),
  body: ListTagKeysResponseBody(name='body'),
}

async function listTagKeysWithOptions(request: ListTagKeysRequest, runtime: Util.RuntimeOptions): ListTagKeysResponse {
  Util.validateModel(request);
  var query = {};
  query["Category"] = request.category;
  query["NextToken"] = request.nextToken;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  query["Scope"] = request.scope;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListTagKeys',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTagKeys(request: ListTagKeysRequest): ListTagKeysResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagKeysWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken'),
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId'),
      resourceType?: string(name='ResourceType'),
      tagKey?: string(name='TagKey'),
      tagValue?: string(name='TagValue'),
    }
  ](name='TagResource')
  }(name='TagResources'),
}

model ListTagResourcesResponse = {
  headers: map[string]string(name='headers'),
  body: ListTagResourcesResponseBody(name='body'),
}

async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  query["NextToken"] = request.nextToken;
  query["RegionId"] = request.regionId;
  query["ResourceId"] = request.resourceId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  query["Tag"] = request.tag;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ListTagValuesRequest {
  key?: string(name='Key'),
  nextToken?: string(name='NextToken'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
  scope?: string(name='Scope'),
}

model ListTagValuesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  nextToken?: string(name='NextToken'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
  values?: {
    value?: [ string ](name='Value')
  }(name='Values'),
}

model ListTagValuesResponse = {
  headers: map[string]string(name='headers'),
  body: ListTagValuesResponseBody(name='body'),
}

async function listTagValuesWithOptions(request: ListTagValuesRequest, runtime: Util.RuntimeOptions): ListTagValuesResponse {
  Util.validateModel(request);
  var query = {};
  query["Key"] = request.key;
  query["NextToken"] = request.nextToken;
  query["PageSize"] = request.pageSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  query["Scope"] = request.scope;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListTagValues',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTagValues(request: ListTagValuesRequest): ListTagValuesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagValuesWithOptions(request, runtime);
}

model ListUsersRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  type?: string(name='Type'),
}

model ListUsersResponseBody = {
  requestId?: string(name='RequestId'),
  userList?: {
    user?: [ 
    {
      groupName?: string(name='GroupName'),
      k8sStatus?: string(name='K8sStatus'),
      kerberosStatus?: string(name='KerberosStatus'),
      knoxStatus?: string(name='KnoxStatus'),
      linuxStatus?: string(name='LinuxStatus'),
      userId?: string(name='UserId'),
      userName?: string(name='UserName'),
    }
  ](name='User')
  }(name='UserList'),
}

model ListUsersResponse = {
  headers: map[string]string(name='headers'),
  body: ListUsersResponseBody(name='body'),
}

async function listUsersWithOptions(request: ListUsersRequest, runtime: Util.RuntimeOptions): ListUsersResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListUsers',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUsers(request: ListUsersRequest): ListUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUsersWithOptions(request, runtime);
}

model ListVswitchRequest {
  depositType?: string(name='DepositType'),
  productType?: string(name='ProductType'),
  regionId?: string(name='RegionId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model ListVswitchResponseBody = {
  requestId?: string(name='RequestId'),
  vswitchList?: {
    vswitch?: [ 
    {
      availableIpAddressCount?: string(name='AvailableIpAddressCount'),
      cidrBlock?: string(name='CidrBlock'),
      creationTime?: string(name='CreationTime'),
      description?: string(name='Description'),
      isDefault?: boolean(name='IsDefault'),
      resourceGroupId?: string(name='ResourceGroupId'),
      status?: string(name='Status'),
      vSwitchId?: string(name='VSwitchId'),
      vSwitchName?: string(name='VSwitchName'),
      vpcId?: string(name='VpcId'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='Vswitch')
  }(name='VswitchList'),
}

model ListVswitchResponse = {
  headers: map[string]string(name='headers'),
  body: ListVswitchResponseBody(name='body'),
}

async function listVswitchWithOptions(request: ListVswitchRequest, runtime: Util.RuntimeOptions): ListVswitchResponse {
  Util.validateModel(request);
  var query = {};
  query["DepositType"] = request.depositType;
  query["ProductType"] = request.productType;
  query["RegionId"] = request.regionId;
  query["VpcId"] = request.vpcId;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ListVswitch',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listVswitch(request: ListVswitchRequest): ListVswitchResponse {
  var runtime = new Util.RuntimeOptions{};
  return listVswitchWithOptions(request, runtime);
}

model ModifyClusterBootstrapActionRequest {
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  clusterId?: string(name='ClusterId'),
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyClusterBootstrapActionResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterBootstrapActionResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterBootstrapActionResponseBody(name='body'),
}

async function modifyClusterBootstrapActionWithOptions(request: ModifyClusterBootstrapActionRequest, runtime: Util.RuntimeOptions): ModifyClusterBootstrapActionResponse {
  Util.validateModel(request);
  var query = {};
  query["BootstrapAction"] = request.bootstrapAction;
  query["ClusterId"] = request.clusterId;
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterBootstrapAction',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterBootstrapAction(request: ModifyClusterBootstrapActionRequest): ModifyClusterBootstrapActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterBootstrapActionWithOptions(request, runtime);
}

model ModifyClusterHostGroupRequest {
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  hostGroupId?: string(name='HostGroupId'),
  hostGroupName?: string(name='HostGroupName'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  vswitchId?: string(name='VswitchId'),
}

model ModifyClusterHostGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterHostGroupResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterHostGroupResponseBody(name='body'),
}

async function modifyClusterHostGroupWithOptions(request: ModifyClusterHostGroupRequest, runtime: Util.RuntimeOptions): ModifyClusterHostGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["HostGroupId"] = request.hostGroupId;
  query["HostGroupName"] = request.hostGroupName;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["VswitchId"] = request.vswitchId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterHostGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterHostGroup(request: ModifyClusterHostGroupRequest): ModifyClusterHostGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterHostGroupWithOptions(request, runtime);
}

model ModifyClusterMetaCollectRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  switchOn?: boolean(name='SwitchOn'),
}

model ModifyClusterMetaCollectResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterMetaCollectResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterMetaCollectResponseBody(name='body'),
}

async function modifyClusterMetaCollectWithOptions(request: ModifyClusterMetaCollectRequest, runtime: Util.RuntimeOptions): ModifyClusterMetaCollectResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SwitchOn"] = request.switchOn;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterMetaCollect',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterMetaCollect(request: ModifyClusterMetaCollectRequest): ModifyClusterMetaCollectResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterMetaCollectWithOptions(request, runtime);
}

model ModifyClusterNameRequest {
  id?: string(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyClusterNameResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterNameResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterNameResponseBody(name='body'),
}

async function modifyClusterNameWithOptions(request: ModifyClusterNameRequest, runtime: Util.RuntimeOptions): ModifyClusterNameResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterName',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterName(request: ModifyClusterNameRequest): ModifyClusterNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterNameWithOptions(request, runtime);
}

model ModifyClusterSecurityGroupRuleRequest {
  clusterId?: string(name='ClusterId'),
  ipProtocol?: string(name='IpProtocol'),
  modifyType?: string(name='ModifyType'),
  nicType?: string(name='NicType'),
  portRange?: string(name='PortRange'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  whiteIp?: string(name='WhiteIp'),
}

model ModifyClusterSecurityGroupRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterSecurityGroupRuleResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterSecurityGroupRuleResponseBody(name='body'),
}

async function modifyClusterSecurityGroupRuleWithOptions(request: ModifyClusterSecurityGroupRuleRequest, runtime: Util.RuntimeOptions): ModifyClusterSecurityGroupRuleResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["IpProtocol"] = request.ipProtocol;
  query["ModifyType"] = request.modifyType;
  query["NicType"] = request.nicType;
  query["PortRange"] = request.portRange;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["WhiteIp"] = request.whiteIp;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterSecurityGroupRule',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterSecurityGroupRule(request: ModifyClusterSecurityGroupRuleRequest): ModifyClusterSecurityGroupRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterSecurityGroupRuleWithOptions(request, runtime);
}

model ModifyClusterServiceConfigRequest {
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  configParams?: string(name='ConfigParams'),
  configType?: string(name='ConfigType'),
  customConfigParams?: string(name='CustomConfigParams'),
  gatewayClusterIdList?: [ string ](name='GatewayClusterIdList'),
  groupId?: string(name='GroupId'),
  hostInstanceId?: string(name='HostInstanceId'),
  refreshHostConfig?: boolean(name='RefreshHostConfig'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceName?: string(name='ServiceName'),
}

model ModifyClusterServiceConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterServiceConfigResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterServiceConfigResponseBody(name='body'),
}

async function modifyClusterServiceConfigWithOptions(request: ModifyClusterServiceConfigRequest, runtime: Util.RuntimeOptions): ModifyClusterServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["ConfigParams"] = request.configParams;
  query["ConfigType"] = request.configType;
  query["CustomConfigParams"] = request.customConfigParams;
  query["GatewayClusterIdList"] = request.gatewayClusterIdList;
  query["GroupId"] = request.groupId;
  query["HostInstanceId"] = request.hostInstanceId;
  query["RefreshHostConfig"] = request.refreshHostConfig;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceName"] = request.serviceName;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterServiceConfig',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterServiceConfig(request: ModifyClusterServiceConfigRequest): ModifyClusterServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterServiceConfigWithOptions(request, runtime);
}

model ModifyClusterTemplateRequest {
  autoRenew?: boolean(name='AutoRenew'),
  bizId?: string(name='BizId'),
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  chargeType?: string(name='ChargeType'),
  clusterType?: string(name='ClusterType'),
  config?: [ 
    {
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      encrypt?: string(name='Encrypt'),
      fileName?: string(name='FileName'),
      replace?: string(name='Replace'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Config'),
  configurations?: string(name='Configurations'),
  depositType?: string(name='DepositType'),
  easEnable?: boolean(name='EasEnable'),
  emrVer?: string(name='EmrVer'),
  highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
  hostGroup?: [ 
    {
      autoRenew?: boolean(name='AutoRenew'),
      chargeType?: string(name='ChargeType'),
      clusterId?: string(name='ClusterId'),
      comment?: string(name='Comment'),
      createType?: string(name='CreateType'),
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostGroupType?: string(name='HostGroupType'),
      instanceType?: string(name='InstanceType'),
      multiInstanceTypes?: string(name='MultiInstanceTypes'),
      nodeCount?: int32(name='NodeCount'),
      period?: int32(name='Period'),
      sysDiskCapacity?: int32(name='SysDiskCapacity'),
      sysDiskType?: string(name='SysDiskType'),
      vSwitchId?: string(name='VSwitchId'),
    }
  ](name='HostGroup'),
  initCustomHiveMetaDb?: boolean(name='InitCustomHiveMetaDb'),
  instanceGeneration?: string(name='InstanceGeneration'),
  ioOptimized?: boolean(name='IoOptimized'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  keyPairName?: string(name='KeyPairName'),
  logPath?: string(name='LogPath'),
  machineType?: string(name='MachineType'),
  masterPwd?: string(name='MasterPwd'),
  metaStoreConf?: string(name='MetaStoreConf'),
  metaStoreType?: string(name='MetaStoreType'),
  netType?: string(name='NetType'),
  optionSoftWareList?: [ string ](name='OptionSoftWareList'),
  period?: int32(name='Period'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  securityGroupName?: string(name='SecurityGroupName'),
  sshEnable?: boolean(name='SshEnable'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
  templateName?: string(name='TemplateName'),
  useCustomHiveMetaDb?: boolean(name='UseCustomHiveMetaDb'),
  useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
  userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyClusterTemplateResponseBody = {
  clusterTemplateId?: string(name='ClusterTemplateId'),
  requestId?: string(name='RequestId'),
}

model ModifyClusterTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyClusterTemplateResponseBody(name='body'),
}

async function modifyClusterTemplateWithOptions(request: ModifyClusterTemplateRequest, runtime: Util.RuntimeOptions): ModifyClusterTemplateResponse {
  Util.validateModel(request);
  var query = {};
  query["AutoRenew"] = request.autoRenew;
  query["BizId"] = request.bizId;
  query["BootstrapAction"] = request.bootstrapAction;
  query["ChargeType"] = request.chargeType;
  query["ClusterType"] = request.clusterType;
  query["Config"] = request.config;
  query["Configurations"] = request.configurations;
  query["DepositType"] = request.depositType;
  query["EasEnable"] = request.easEnable;
  query["EmrVer"] = request.emrVer;
  query["HighAvailabilityEnable"] = request.highAvailabilityEnable;
  query["HostGroup"] = request.hostGroup;
  query["InitCustomHiveMetaDb"] = request.initCustomHiveMetaDb;
  query["InstanceGeneration"] = request.instanceGeneration;
  query["IoOptimized"] = request.ioOptimized;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["KeyPairName"] = request.keyPairName;
  query["LogPath"] = request.logPath;
  query["MachineType"] = request.machineType;
  query["MasterPwd"] = request.masterPwd;
  query["MetaStoreConf"] = request.metaStoreConf;
  query["MetaStoreType"] = request.metaStoreType;
  query["NetType"] = request.netType;
  query["OptionSoftWareList"] = request.optionSoftWareList;
  query["Period"] = request.period;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["SecurityGroupName"] = request.securityGroupName;
  query["SshEnable"] = request.sshEnable;
  query["Tag"] = request.tag;
  query["TemplateName"] = request.templateName;
  query["UseCustomHiveMetaDb"] = request.useCustomHiveMetaDb;
  query["UseLocalMetaDb"] = request.useLocalMetaDb;
  query["UserDefinedEmrEcsRole"] = request.userDefinedEmrEcsRole;
  query["VSwitchId"] = request.vSwitchId;
  query["VpcId"] = request.vpcId;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterTemplate',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyClusterTemplate(request: ModifyClusterTemplateRequest): ModifyClusterTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterTemplateWithOptions(request, runtime);
}

model ModifyExecutionPlanRequest {
  bootstrapAction?: [ 
    {
      arg?: string(name='Arg'),
      executionFailStrategy?: string(name='ExecutionFailStrategy'),
      executionMoment?: string(name='ExecutionMoment'),
      executionTarget?: string(name='ExecutionTarget'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='BootstrapAction'),
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  clusterType?: string(name='ClusterType'),
  config?: [ 
    {
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      encrypt?: string(name='Encrypt'),
      fileName?: string(name='FileName'),
      replace?: string(name='Replace'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='Config'),
  configurations?: string(name='Configurations'),
  createClusterOnDemand?: boolean(name='CreateClusterOnDemand'),
  dayOfMonth?: string(name='DayOfMonth'),
  dayOfWeek?: string(name='DayOfWeek'),
  easEnable?: boolean(name='EasEnable'),
  ecsOrder?: [ 
    {
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      index?: int32(name='Index'),
      instanceType?: string(name='InstanceType'),
      nodeCount?: int32(name='NodeCount'),
      nodeType?: string(name='NodeType'),
    }
  ](name='EcsOrder'),
  emrVer?: string(name='EmrVer'),
  executionPlanVersion?: long(name='ExecutionPlanVersion'),
  highAvailabilityEnable?: boolean(name='HighAvailabilityEnable'),
  id?: string(name='Id'),
  initCustomHiveMetaDB?: boolean(name='InitCustomHiveMetaDB'),
  instanceGeneration?: string(name='InstanceGeneration'),
  ioOptimized?: boolean(name='IoOptimized'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  jobIdList?: [ string ](name='JobIdList'),
  logEnable?: boolean(name='LogEnable'),
  logPath?: string(name='LogPath'),
  name?: string(name='Name'),
  netType?: string(name='NetType'),
  optionSoftWareList?: [ string ](name='OptionSoftWareList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityGroupId?: string(name='SecurityGroupId'),
  startTime?: long(name='StartTime'),
  strategy?: string(name='Strategy'),
  timeInterval?: int32(name='TimeInterval'),
  timeUnit?: string(name='TimeUnit'),
  useCustomHiveMetaDB?: boolean(name='UseCustomHiveMetaDB'),
  useLocalMetaDb?: boolean(name='UseLocalMetaDb'),
  userDefinedEmrEcsRole?: string(name='UserDefinedEmrEcsRole'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  workflowDefinition?: string(name='WorkflowDefinition'),
  zoneId?: string(name='ZoneId'),
}

model ModifyExecutionPlanResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyExecutionPlanResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyExecutionPlanResponseBody(name='body'),
}

async function modifyExecutionPlanWithOptions(request: ModifyExecutionPlanRequest, runtime: Util.RuntimeOptions): ModifyExecutionPlanResponse {
  Util.validateModel(request);
  var query = {};
  query["BootstrapAction"] = request.bootstrapAction;
  query["ClusterId"] = request.clusterId;
  query["ClusterName"] = request.clusterName;
  query["ClusterType"] = request.clusterType;
  query["Config"] = request.config;
  query["Configurations"] = request.configurations;
  query["CreateClusterOnDemand"] = request.createClusterOnDemand;
  query["DayOfMonth"] = request.dayOfMonth;
  query["DayOfWeek"] = request.dayOfWeek;
  query["EasEnable"] = request.easEnable;
  query["EcsOrder"] = request.ecsOrder;
  query["EmrVer"] = request.emrVer;
  query["ExecutionPlanVersion"] = request.executionPlanVersion;
  query["HighAvailabilityEnable"] = request.highAvailabilityEnable;
  query["Id"] = request.id;
  query["InitCustomHiveMetaDB"] = request.initCustomHiveMetaDB;
  query["InstanceGeneration"] = request.instanceGeneration;
  query["IoOptimized"] = request.ioOptimized;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["JobIdList"] = request.jobIdList;
  query["LogEnable"] = request.logEnable;
  query["LogPath"] = request.logPath;
  query["Name"] = request.name;
  query["NetType"] = request.netType;
  query["OptionSoftWareList"] = request.optionSoftWareList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SecurityGroupId"] = request.securityGroupId;
  query["StartTime"] = request.startTime;
  query["Strategy"] = request.strategy;
  query["TimeInterval"] = request.timeInterval;
  query["TimeUnit"] = request.timeUnit;
  query["UseCustomHiveMetaDB"] = request.useCustomHiveMetaDB;
  query["UseLocalMetaDb"] = request.useLocalMetaDb;
  query["UserDefinedEmrEcsRole"] = request.userDefinedEmrEcsRole;
  query["VSwitchId"] = request.vSwitchId;
  query["VpcId"] = request.vpcId;
  query["WorkflowDefinition"] = request.workflowDefinition;
  query["ZoneId"] = request.zoneId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyExecutionPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyExecutionPlan(request: ModifyExecutionPlanRequest): ModifyExecutionPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyExecutionPlanWithOptions(request, runtime);
}

model ModifyFlowRequest {
  alertConf?: string(name='AlertConf'),
  alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
  alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
  application?: string(name='Application'),
  clusterId?: string(name='ClusterId'),
  createCluster?: boolean(name='CreateCluster'),
  cronExpr?: string(name='CronExpr'),
  description?: string(name='Description'),
  endSchedule?: long(name='EndSchedule'),
  hostName?: string(name='HostName'),
  id?: string(name='Id'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  name?: string(name='Name'),
  namespace?: string(name='Namespace'),
  parentCategory?: string(name='ParentCategory'),
  parentFlowList?: string(name='ParentFlowList'),
  periodic?: boolean(name='Periodic'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  startSchedule?: long(name='StartSchedule'),
  status?: string(name='Status'),
}

model ModifyFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowResponseBody(name='body'),
}

async function modifyFlowWithOptions(request: ModifyFlowRequest, runtime: Util.RuntimeOptions): ModifyFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["AlertConf"] = request.alertConf;
  query["AlertDingDingGroupBizId"] = request.alertDingDingGroupBizId;
  query["AlertUserGroupBizId"] = request.alertUserGroupBizId;
  query["Application"] = request.application;
  query["ClusterId"] = request.clusterId;
  query["CreateCluster"] = request.createCluster;
  query["CronExpr"] = request.cronExpr;
  query["Description"] = request.description;
  query["EndSchedule"] = request.endSchedule;
  query["HostName"] = request.hostName;
  query["Id"] = request.id;
  query["Lifecycle"] = request.lifecycle;
  query["LogArchiveLocation"] = request.logArchiveLocation;
  query["Name"] = request.name;
  query["Namespace"] = request.namespace;
  query["ParentCategory"] = request.parentCategory;
  query["ParentFlowList"] = request.parentFlowList;
  query["Periodic"] = request.periodic;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StartSchedule"] = request.startSchedule;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlow(request: ModifyFlowRequest): ModifyFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowWithOptions(request, runtime);
}

model ModifyFlowCategoryRequest {
  id?: string(name='Id'),
  name?: string(name='Name'),
  parentId?: string(name='ParentId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ModifyFlowCategoryResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowCategoryResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowCategoryResponseBody(name='body'),
}

async function modifyFlowCategoryWithOptions(request: ModifyFlowCategoryRequest, runtime: Util.RuntimeOptions): ModifyFlowCategoryResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["ParentId"] = request.parentId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlowCategory',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlowCategory(request: ModifyFlowCategoryRequest): ModifyFlowCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowCategoryWithOptions(request, runtime);
}

model ModifyFlowForWebRequest {
  alertConf?: string(name='AlertConf'),
  alertDingDingGroupBizId?: string(name='AlertDingDingGroupBizId'),
  alertUserGroupBizId?: string(name='AlertUserGroupBizId'),
  clusterId?: string(name='ClusterId'),
  createCluster?: boolean(name='CreateCluster'),
  cronExpr?: string(name='CronExpr'),
  description?: string(name='Description'),
  endSchedule?: long(name='EndSchedule'),
  graph?: string(name='Graph'),
  hostName?: string(name='HostName'),
  id?: string(name='Id'),
  lifecycle?: string(name='Lifecycle'),
  logArchiveLocation?: string(name='LogArchiveLocation'),
  name?: string(name='Name'),
  namespace?: string(name='Namespace'),
  parentCategory?: string(name='ParentCategory'),
  parentFlowList?: string(name='ParentFlowList'),
  periodic?: boolean(name='Periodic'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  startSchedule?: long(name='StartSchedule'),
  status?: string(name='Status'),
}

model ModifyFlowForWebResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowForWebResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowForWebResponseBody(name='body'),
}

async function modifyFlowForWebWithOptions(request: ModifyFlowForWebRequest, runtime: Util.RuntimeOptions): ModifyFlowForWebResponse {
  Util.validateModel(request);
  var query = {};
  query["AlertConf"] = request.alertConf;
  query["AlertDingDingGroupBizId"] = request.alertDingDingGroupBizId;
  query["AlertUserGroupBizId"] = request.alertUserGroupBizId;
  query["ClusterId"] = request.clusterId;
  query["CreateCluster"] = request.createCluster;
  query["CronExpr"] = request.cronExpr;
  query["Description"] = request.description;
  query["EndSchedule"] = request.endSchedule;
  query["Graph"] = request.graph;
  query["HostName"] = request.hostName;
  query["Id"] = request.id;
  query["Lifecycle"] = request.lifecycle;
  query["LogArchiveLocation"] = request.logArchiveLocation;
  query["Name"] = request.name;
  query["Namespace"] = request.namespace;
  query["ParentCategory"] = request.parentCategory;
  query["ParentFlowList"] = request.parentFlowList;
  query["Periodic"] = request.periodic;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["StartSchedule"] = request.startSchedule;
  query["Status"] = request.status;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlowForWeb',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlowForWeb(request: ModifyFlowForWebRequest): ModifyFlowForWebResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowForWebWithOptions(request, runtime);
}

model ModifyFlowJobRequest {
  alertConf?: string(name='AlertConf'),
  clusterId?: string(name='ClusterId'),
  customVariables?: string(name='CustomVariables'),
  description?: string(name='Description'),
  envConf?: string(name='EnvConf'),
  failAct?: string(name='FailAct'),
  id?: string(name='Id'),
  maxRetry?: int32(name='MaxRetry'),
  maxRunningTimeSec?: long(name='MaxRunningTimeSec'),
  mode?: string(name='Mode'),
  monitorConf?: string(name='MonitorConf'),
  name?: string(name='Name'),
  paramConf?: string(name='ParamConf'),
  params?: string(name='Params'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
  resourceList?: [ 
    {
      alias?: string(name='Alias'),
      path?: string(name='Path'),
    }
  ](name='ResourceList'),
  retryInterval?: long(name='RetryInterval'),
  retryPolicy?: string(name='RetryPolicy'),
  runConf?: string(name='RunConf'),
}

model ModifyFlowJobResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowJobResponseBody(name='body'),
}

async function modifyFlowJobWithOptions(request: ModifyFlowJobRequest, runtime: Util.RuntimeOptions): ModifyFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["AlertConf"] = request.alertConf;
  query["ClusterId"] = request.clusterId;
  query["CustomVariables"] = request.customVariables;
  query["Description"] = request.description;
  query["EnvConf"] = request.envConf;
  query["FailAct"] = request.failAct;
  query["Id"] = request.id;
  query["MaxRetry"] = request.maxRetry;
  query["MaxRunningTimeSec"] = request.maxRunningTimeSec;
  query["Mode"] = request.mode;
  query["MonitorConf"] = request.monitorConf;
  query["Name"] = request.name;
  query["ParamConf"] = request.paramConf;
  query["Params"] = request.params;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  query["ResourceList"] = request.resourceList;
  query["RetryInterval"] = request.retryInterval;
  query["RetryPolicy"] = request.retryPolicy;
  query["RunConf"] = request.runConf;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlowJob(request: ModifyFlowJobRequest): ModifyFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowJobWithOptions(request, runtime);
}

model ModifyFlowProjectRequest {
  description?: string(name='Description'),
  name?: string(name='Name'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ModifyFlowProjectResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowProjectResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowProjectResponseBody(name='body'),
}

async function modifyFlowProjectWithOptions(request: ModifyFlowProjectRequest, runtime: Util.RuntimeOptions): ModifyFlowProjectResponse {
  Util.validateModel(request);
  var query = {};
  query["Description"] = request.description;
  query["Name"] = request.name;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlowProject',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlowProject(request: ModifyFlowProjectRequest): ModifyFlowProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowProjectWithOptions(request, runtime);
}

model ModifyFlowProjectClusterSettingRequest {
  clusterId?: string(name='ClusterId'),
  defaultQueue?: string(name='DefaultQueue'),
  defaultUser?: string(name='DefaultUser'),
  hostList?: [ string ](name='HostList'),
  projectId?: string(name='ProjectId'),
  queueList?: [ string ](name='QueueList'),
  regionId?: string(name='RegionId'),
  userList?: [ string ](name='UserList'),
}

model ModifyFlowProjectClusterSettingResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyFlowProjectClusterSettingResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyFlowProjectClusterSettingResponseBody(name='body'),
}

async function modifyFlowProjectClusterSettingWithOptions(request: ModifyFlowProjectClusterSettingRequest, runtime: Util.RuntimeOptions): ModifyFlowProjectClusterSettingResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["DefaultQueue"] = request.defaultQueue;
  query["DefaultUser"] = request.defaultUser;
  query["HostList"] = request.hostList;
  query["ProjectId"] = request.projectId;
  query["QueueList"] = request.queueList;
  query["RegionId"] = request.regionId;
  query["UserList"] = request.userList;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFlowProjectClusterSetting',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyFlowProjectClusterSetting(request: ModifyFlowProjectClusterSettingRequest): ModifyFlowProjectClusterSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFlowProjectClusterSettingWithOptions(request, runtime);
}

model ModifyJobRequest {
  failAct?: string(name='FailAct'),
  id?: string(name='Id'),
  maxRetry?: int32(name='MaxRetry'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  retryInterval?: int32(name='RetryInterval'),
  runParameter?: string(name='RunParameter'),
  type?: string(name='Type'),
}

model ModifyJobResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyJobResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyJobResponseBody(name='body'),
}

async function modifyJobWithOptions(request: ModifyJobRequest, runtime: Util.RuntimeOptions): ModifyJobResponse {
  Util.validateModel(request);
  var query = {};
  query["FailAct"] = request.failAct;
  query["Id"] = request.id;
  query["MaxRetry"] = request.maxRetry;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RetryInterval"] = request.retryInterval;
  query["RunParameter"] = request.runParameter;
  query["Type"] = request.type;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyJob(request: ModifyJobRequest): ModifyJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyJobWithOptions(request, runtime);
}

model ModifyResourcePoolRequest {
  active?: boolean(name='Active'),
  clusterId?: string(name='ClusterId'),
  config?: [ 
    {
      category?: string(name='Category'),
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      id?: string(name='Id'),
      note?: string(name='Note'),
    }
  ](name='Config'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  yarnsiteconfig?: string(name='Yarnsiteconfig'),
}

model ModifyResourcePoolResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyResourcePoolResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyResourcePoolResponseBody(name='body'),
}

async function modifyResourcePoolWithOptions(request: ModifyResourcePoolRequest, runtime: Util.RuntimeOptions): ModifyResourcePoolResponse {
  Util.validateModel(request);
  var query = {};
  query["Active"] = request.active;
  query["ClusterId"] = request.clusterId;
  query["Config"] = request.config;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Yarnsiteconfig"] = request.yarnsiteconfig;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyResourcePool',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyResourcePool(request: ModifyResourcePoolRequest): ModifyResourcePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyResourcePoolWithOptions(request, runtime);
}

model ModifyResourcePoolSchedulerTypeRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  schedulerType?: string(name='SchedulerType'),
}

model ModifyResourcePoolSchedulerTypeResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyResourcePoolSchedulerTypeResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyResourcePoolSchedulerTypeResponseBody(name='body'),
}

async function modifyResourcePoolSchedulerTypeWithOptions(request: ModifyResourcePoolSchedulerTypeRequest, runtime: Util.RuntimeOptions): ModifyResourcePoolSchedulerTypeResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["SchedulerType"] = request.schedulerType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyResourcePoolSchedulerType',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyResourcePoolSchedulerType(request: ModifyResourcePoolSchedulerTypeRequest): ModifyResourcePoolSchedulerTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyResourcePoolSchedulerTypeWithOptions(request, runtime);
}

model ModifyResourceQueueRequest {
  clusterId?: string(name='ClusterId'),
  config?: [ 
    {
      category?: string(name='Category'),
      configKey?: string(name='ConfigKey'),
      configValue?: string(name='ConfigValue'),
      id?: long(name='Id'),
      note?: string(name='Note'),
    }
  ](name='Config'),
  id?: string(name='Id'),
  leaf?: boolean(name='Leaf'),
  name?: string(name='Name'),
  parentQueueId?: long(name='ParentQueueId'),
  qualifiedName?: string(name='QualifiedName'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourcePoolId?: long(name='ResourcePoolId'),
}

model ModifyResourceQueueResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyResourceQueueResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyResourceQueueResponseBody(name='body'),
}

async function modifyResourceQueueWithOptions(request: ModifyResourceQueueRequest, runtime: Util.RuntimeOptions): ModifyResourceQueueResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Config"] = request.config;
  query["Id"] = request.id;
  query["Leaf"] = request.leaf;
  query["Name"] = request.name;
  query["ParentQueueId"] = request.parentQueueId;
  query["QualifiedName"] = request.qualifiedName;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourcePoolId"] = request.resourcePoolId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyResourceQueue',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyResourceQueue(request: ModifyResourceQueueRequest): ModifyResourceQueueResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyResourceQueueWithOptions(request, runtime);
}

model ModifyScalingConfigItemV2Request {
  configItemBizId?: string(name='ConfigItemBizId'),
  configItemInformation?: string(name='ConfigItemInformation'),
  configItemType?: string(name='ConfigItemType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model ModifyScalingConfigItemV2ResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyScalingConfigItemV2Response = {
  headers: map[string]string(name='headers'),
  body: ModifyScalingConfigItemV2ResponseBody(name='body'),
}

async function modifyScalingConfigItemV2WithOptions(request: ModifyScalingConfigItemV2Request, runtime: Util.RuntimeOptions): ModifyScalingConfigItemV2Response {
  Util.validateModel(request);
  var query = {};
  query["ConfigItemBizId"] = request.configItemBizId;
  query["ConfigItemInformation"] = request.configItemInformation;
  query["ConfigItemType"] = request.configItemType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingConfigItemV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyScalingConfigItemV2(request: ModifyScalingConfigItemV2Request): ModifyScalingConfigItemV2Response {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingConfigItemV2WithOptions(request, runtime);
}

model ModifyScalingGroupV2Request {
  description?: string(name='Description'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model ModifyScalingGroupV2ResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ModifyScalingGroupV2Response = {
  headers: map[string]string(name='headers'),
  body: ModifyScalingGroupV2ResponseBody(name='body'),
}

async function modifyScalingGroupV2WithOptions(request: ModifyScalingGroupV2Request, runtime: Util.RuntimeOptions): ModifyScalingGroupV2Response {
  Util.validateModel(request);
  var query = {};
  query["Description"] = request.description;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingGroupV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyScalingGroupV2(request: ModifyScalingGroupV2Request): ModifyScalingGroupV2Response {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingGroupV2WithOptions(request, runtime);
}

model ModifyScalingRuleRequest {
  adjustmentType?: string(name='AdjustmentType'),
  adjustmentValue?: int32(name='AdjustmentValue'),
  cloudWatchTrigger?: [ 
    {
      comparisonOperator?: string(name='ComparisonOperator'),
      evaluationCount?: string(name='EvaluationCount'),
      metricName?: string(name='MetricName'),
      period?: int32(name='Period'),
      statistics?: string(name='Statistics'),
      threshold?: string(name='Threshold'),
    }
  ](name='CloudWatchTrigger'),
  clusterId?: string(name='ClusterId'),
  cooldown?: int32(name='Cooldown'),
  hostGroupId?: string(name='HostGroupId'),
  launchExpirationTime?: int32(name='LaunchExpirationTime'),
  launchTime?: string(name='LaunchTime'),
  recurrenceEndTime?: string(name='RecurrenceEndTime'),
  recurrenceType?: string(name='RecurrenceType'),
  recurrenceValue?: string(name='RecurrenceValue'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleName?: string(name='RuleName'),
  scalingRuleId?: string(name='ScalingRuleId'),
  schedulerTrigger?: [ 
    {
      launchExpirationTime?: int32(name='LaunchExpirationTime'),
      launchTime?: string(name='LaunchTime'),
      recurrenceEndTime?: string(name='RecurrenceEndTime'),
      recurrenceType?: string(name='RecurrenceType'),
      recurrenceValue?: string(name='RecurrenceValue'),
    }
  ](name='SchedulerTrigger'),
  timeoutWithGrace?: long(name='TimeoutWithGrace'),
  withGrace?: boolean(name='WithGrace'),
}

model ModifyScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
  scalingRuleId?: string(name='ScalingRuleId'),
}

model ModifyScalingRuleResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyScalingRuleResponseBody(name='body'),
}

async function modifyScalingRuleWithOptions(request: ModifyScalingRuleRequest, runtime: Util.RuntimeOptions): ModifyScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  query["AdjustmentType"] = request.adjustmentType;
  query["AdjustmentValue"] = request.adjustmentValue;
  query["CloudWatchTrigger"] = request.cloudWatchTrigger;
  query["ClusterId"] = request.clusterId;
  query["Cooldown"] = request.cooldown;
  query["HostGroupId"] = request.hostGroupId;
  query["LaunchExpirationTime"] = request.launchExpirationTime;
  query["LaunchTime"] = request.launchTime;
  query["RecurrenceEndTime"] = request.recurrenceEndTime;
  query["RecurrenceType"] = request.recurrenceType;
  query["RecurrenceValue"] = request.recurrenceValue;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RuleName"] = request.ruleName;
  query["ScalingRuleId"] = request.scalingRuleId;
  query["SchedulerTrigger"] = request.schedulerTrigger;
  query["TimeoutWithGrace"] = request.timeoutWithGrace;
  query["WithGrace"] = request.withGrace;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingRule',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyScalingRule(request: ModifyScalingRuleRequest): ModifyScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingRuleWithOptions(request, runtime);
}

model ModifyScalingTaskGroupRequest {
  activeRuleCategory?: string(name='ActiveRuleCategory'),
  clusterId?: string(name='ClusterId'),
  defaultCooldown?: int32(name='DefaultCooldown'),
  hostGroupId?: string(name='HostGroupId'),
  maxSize?: int32(name='MaxSize'),
  minSize?: int32(name='MinSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  timeoutWithGrace?: long(name='TimeoutWithGrace'),
  withGrace?: boolean(name='WithGrace'),
}

model ModifyScalingTaskGroupResponseBody = {
  hostGroupId?: string(name='HostGroupId'),
}

model ModifyScalingTaskGroupResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyScalingTaskGroupResponseBody(name='body'),
}

async function modifyScalingTaskGroupWithOptions(request: ModifyScalingTaskGroupRequest, runtime: Util.RuntimeOptions): ModifyScalingTaskGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["ActiveRuleCategory"] = request.activeRuleCategory;
  query["ClusterId"] = request.clusterId;
  query["DefaultCooldown"] = request.defaultCooldown;
  query["HostGroupId"] = request.hostGroupId;
  query["MaxSize"] = request.maxSize;
  query["MinSize"] = request.minSize;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TimeoutWithGrace"] = request.timeoutWithGrace;
  query["WithGrace"] = request.withGrace;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingTaskGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyScalingTaskGroup(request: ModifyScalingTaskGroupRequest): ModifyScalingTaskGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingTaskGroupWithOptions(request, runtime);
}

model QueryEntityRequest {
  category?: string(name='Category'),
  description?: string(name='Description'),
  id?: long(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryEntityResponseBody = {
  items?: {
    item?: [ 
    {
      entityId?: string(name='EntityId'),
      entityType?: string(name='EntityType'),
      tagId?: long(name='TagId'),
    }
  ](name='Item')
  }(name='Items'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model QueryEntityResponse = {
  headers: map[string]string(name='headers'),
  body: QueryEntityResponseBody(name='body'),
}

async function queryEntityWithOptions(request: QueryEntityRequest, runtime: Util.RuntimeOptions): QueryEntityResponse {
  Util.validateModel(request);
  var query = {};
  query["Category"] = request.category;
  query["Description"] = request.description;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryEntity',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEntity(request: QueryEntityRequest): QueryEntityResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEntityWithOptions(request, runtime);
}

model QueryTagRequest {
  entityId?: string(name='EntityId'),
  entityType?: string(name='EntityType'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tagId?: long(name='TagId'),
}

model QueryTagResponseBody = {
  items?: {
    item?: [ 
    {
      category?: string(name='Category'),
      description?: string(name='Description'),
      name?: string(name='Name'),
    }
  ](name='Item')
  }(name='Items'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model QueryTagResponse = {
  headers: map[string]string(name='headers'),
  body: QueryTagResponseBody(name='body'),
}

async function queryTagWithOptions(request: QueryTagRequest, runtime: Util.RuntimeOptions): QueryTagResponse {
  Util.validateModel(request);
  var query = {};
  query["EntityId"] = request.entityId;
  query["EntityType"] = request.entityType;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["TagId"] = request.tagId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'QueryTag',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryTag(request: QueryTagRequest): QueryTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryTagWithOptions(request, runtime);
}

model RefreshClusterResourcePoolRequest {
  clusterId?: string(name='ClusterId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourcePoolId?: long(name='ResourcePoolId'),
}

model RefreshClusterResourcePoolResponseBody = {
  operationId?: string(name='OperationId'),
  requestId?: string(name='RequestId'),
  workFlowInstanceId?: string(name='WorkFlowInstanceId'),
}

model RefreshClusterResourcePoolResponse = {
  headers: map[string]string(name='headers'),
  body: RefreshClusterResourcePoolResponseBody(name='body'),
}

async function refreshClusterResourcePoolWithOptions(request: RefreshClusterResourcePoolRequest, runtime: Util.RuntimeOptions): RefreshClusterResourcePoolResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourcePoolId"] = request.resourcePoolId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RefreshClusterResourcePool',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function refreshClusterResourcePool(request: RefreshClusterResourcePoolRequest): RefreshClusterResourcePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return refreshClusterResourcePoolWithOptions(request, runtime);
}

model ReleaseClusterRequest {
  forceRelease?: boolean(name='ForceRelease'),
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ReleaseClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleaseClusterResponse = {
  headers: map[string]string(name='headers'),
  body: ReleaseClusterResponseBody(name='body'),
}

async function releaseClusterWithOptions(request: ReleaseClusterRequest, runtime: Util.RuntimeOptions): ReleaseClusterResponse {
  Util.validateModel(request);
  var query = {};
  query["ForceRelease"] = request.forceRelease;
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseCluster',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function releaseCluster(request: ReleaseClusterRequest): ReleaseClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseClusterWithOptions(request, runtime);
}

model ReleaseClusterHostGroupRequest {
  clusterId?: string(name='ClusterId'),
  hostGroupId?: string(name='HostGroupId'),
  instanceIdList?: string(name='InstanceIdList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ReleaseClusterHostGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleaseClusterHostGroupResponse = {
  headers: map[string]string(name='headers'),
  body: ReleaseClusterHostGroupResponseBody(name='body'),
}

async function releaseClusterHostGroupWithOptions(request: ReleaseClusterHostGroupRequest, runtime: Util.RuntimeOptions): ReleaseClusterHostGroupResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["HostGroupId"] = request.hostGroupId;
  query["InstanceIdList"] = request.instanceIdList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseClusterHostGroup',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function releaseClusterHostGroup(request: ReleaseClusterHostGroupRequest): ReleaseClusterHostGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseClusterHostGroupWithOptions(request, runtime);
}

model RemoveScalingConfigItemV2Request {
  configItemBizId?: string(name='ConfigItemBizId'),
  configItemType?: string(name='ConfigItemType'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model RemoveScalingConfigItemV2ResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model RemoveScalingConfigItemV2Response = {
  headers: map[string]string(name='headers'),
  body: RemoveScalingConfigItemV2ResponseBody(name='body'),
}

async function removeScalingConfigItemV2WithOptions(request: RemoveScalingConfigItemV2Request, runtime: Util.RuntimeOptions): RemoveScalingConfigItemV2Response {
  Util.validateModel(request);
  var query = {};
  query["ConfigItemBizId"] = request.configItemBizId;
  query["ConfigItemType"] = request.configItemType;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RemoveScalingConfigItemV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeScalingConfigItemV2(request: RemoveScalingConfigItemV2Request): RemoveScalingConfigItemV2Response {
  var runtime = new Util.RuntimeOptions{};
  return removeScalingConfigItemV2WithOptions(request, runtime);
}

model RerunFlowRequest {
  flowInstanceId?: string(name='FlowInstanceId'),
  projectId?: string(name='ProjectId'),
  reRunFail?: boolean(name='ReRunFail'),
  regionId?: string(name='RegionId'),
}

model RerunFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model RerunFlowResponse = {
  headers: map[string]string(name='headers'),
  body: RerunFlowResponseBody(name='body'),
}

async function rerunFlowWithOptions(request: RerunFlowRequest, runtime: Util.RuntimeOptions): RerunFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["FlowInstanceId"] = request.flowInstanceId;
  query["ProjectId"] = request.projectId;
  query["ReRunFail"] = request.reRunFail;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RerunFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rerunFlow(request: RerunFlowRequest): RerunFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return rerunFlowWithOptions(request, runtime);
}

model ResizeClusterV2Request {
  autoPayOrder?: boolean(name='AutoPayOrder'),
  clusterId?: string(name='ClusterId'),
  hostComponentInfo?: [ 
    {
      componentNameList?: [ string ](name='ComponentNameList'),
      hostName?: string(name='HostName'),
      serviceName?: string(name='ServiceName'),
    }
  ](name='HostComponentInfo'),
  hostGroup?: [ 
    {
      autoRenew?: boolean(name='AutoRenew'),
      chargeType?: string(name='ChargeType'),
      clusterId?: string(name='ClusterId'),
      comment?: string(name='Comment'),
      createType?: string(name='CreateType'),
      diskCapacity?: int32(name='DiskCapacity'),
      diskCount?: int32(name='DiskCount'),
      diskType?: string(name='DiskType'),
      hostGroupId?: string(name='HostGroupId'),
      hostGroupName?: string(name='HostGroupName'),
      hostGroupType?: string(name='HostGroupType'),
      hostKeyPairName?: string(name='HostKeyPairName'),
      hostPassword?: string(name='HostPassword'),
      instanceType?: string(name='InstanceType'),
      nodeCount?: int32(name='NodeCount'),
      period?: int32(name='Period'),
      privatePoolOptionsId?: string(name='PrivatePoolOptionsId'),
      privatePoolOptionsMatchCriteria?: string(name='PrivatePoolOptionsMatchCriteria'),
      sysDiskCapacity?: int32(name='SysDiskCapacity'),
      sysDiskType?: string(name='SysDiskType'),
      vswitchId?: int32(name='VswitchId'),
    }
  ](name='HostGroup'),
  isOpenPublicIp?: boolean(name='IsOpenPublicIp'),
  promotionInfo?: [ 
    {
      productCode?: string(name='ProductCode'),
      promotionOptionCode?: string(name='PromotionOptionCode'),
      promotionOptionNo?: string(name='PromotionOptionNo'),
    }
  ](name='PromotionInfo'),
  regionId?: string(name='RegionId'),
  vswitchId?: string(name='VswitchId'),
}

model ResizeClusterV2ResponseBody = {
  clusterId?: string(name='ClusterId'),
  requestId?: string(name='RequestId'),
}

model ResizeClusterV2Response = {
  headers: map[string]string(name='headers'),
  body: ResizeClusterV2ResponseBody(name='body'),
}

async function resizeClusterV2WithOptions(request: ResizeClusterV2Request, runtime: Util.RuntimeOptions): ResizeClusterV2Response {
  Util.validateModel(request);
  var query = {};
  query["AutoPayOrder"] = request.autoPayOrder;
  query["ClusterId"] = request.clusterId;
  query["HostComponentInfo"] = request.hostComponentInfo;
  query["HostGroup"] = request.hostGroup;
  query["IsOpenPublicIp"] = request.isOpenPublicIp;
  query["PromotionInfo"] = request.promotionInfo;
  query["RegionId"] = request.regionId;
  query["VswitchId"] = request.vswitchId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ResizeClusterV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resizeClusterV2(request: ResizeClusterV2Request): ResizeClusterV2Response {
  var runtime = new Util.RuntimeOptions{};
  return resizeClusterV2WithOptions(request, runtime);
}

model ResumeExecutionPlanSchedulerRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ResumeExecutionPlanSchedulerResponseBody = {
  requestId?: string(name='RequestId'),
}

model ResumeExecutionPlanSchedulerResponse = {
  headers: map[string]string(name='headers'),
  body: ResumeExecutionPlanSchedulerResponseBody(name='body'),
}

async function resumeExecutionPlanSchedulerWithOptions(request: ResumeExecutionPlanSchedulerRequest, runtime: Util.RuntimeOptions): ResumeExecutionPlanSchedulerResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ResumeExecutionPlanScheduler',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resumeExecutionPlanScheduler(request: ResumeExecutionPlanSchedulerRequest): ResumeExecutionPlanSchedulerResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeExecutionPlanSchedulerWithOptions(request, runtime);
}

model ResumeFlowRequest {
  flowInstanceId?: string(name='FlowInstanceId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model ResumeFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model ResumeFlowResponse = {
  headers: map[string]string(name='headers'),
  body: ResumeFlowResponseBody(name='body'),
}

async function resumeFlowWithOptions(request: ResumeFlowRequest, runtime: Util.RuntimeOptions): ResumeFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["FlowInstanceId"] = request.flowInstanceId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'ResumeFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resumeFlow(request: ResumeFlowRequest): ResumeFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeFlowWithOptions(request, runtime);
}

model RetryOperationRequest {
  operationId?: string(name='OperationId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RetryOperationResponseBody = {
  errCode?: string(name='ErrCode'),
  errMsg?: string(name='ErrMsg'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model RetryOperationResponse = {
  headers: map[string]string(name='headers'),
  body: RetryOperationResponseBody(name='body'),
}

async function retryOperationWithOptions(request: RetryOperationRequest, runtime: Util.RuntimeOptions): RetryOperationResponse {
  Util.validateModel(request);
  var query = {};
  query["OperationId"] = request.operationId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RetryOperation',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function retryOperation(request: RetryOperationRequest): RetryOperationResponse {
  var runtime = new Util.RuntimeOptions{};
  return retryOperationWithOptions(request, runtime);
}

model RunClusterServiceActionRequest {
  clusterId?: string(name='ClusterId'),
  comment?: string(name='Comment'),
  componentNameList?: string(name='ComponentNameList'),
  customCommand?: string(name='CustomCommand'),
  customParams?: string(name='CustomParams'),
  executeStrategy?: string(name='ExecuteStrategy'),
  hostGroupIdList?: [ string ](name='HostGroupIdList'),
  hostIdList?: string(name='HostIdList'),
  interval?: long(name='Interval'),
  isRolling?: boolean(name='IsRolling'),
  nodeCountPerBatch?: int32(name='NodeCountPerBatch'),
  onlyRestartStaleConfigNodes?: boolean(name='OnlyRestartStaleConfigNodes'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serviceActionName?: string(name='ServiceActionName'),
  serviceName?: string(name='ServiceName'),
  totlerateFailCount?: int32(name='TotlerateFailCount'),
  turnOnMaintenanceMode?: boolean(name='TurnOnMaintenanceMode'),
}

model RunClusterServiceActionResponseBody = {
  requestId?: string(name='RequestId'),
}

model RunClusterServiceActionResponse = {
  headers: map[string]string(name='headers'),
  body: RunClusterServiceActionResponseBody(name='body'),
}

async function runClusterServiceActionWithOptions(request: RunClusterServiceActionRequest, runtime: Util.RuntimeOptions): RunClusterServiceActionResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Comment"] = request.comment;
  query["ComponentNameList"] = request.componentNameList;
  query["CustomCommand"] = request.customCommand;
  query["CustomParams"] = request.customParams;
  query["ExecuteStrategy"] = request.executeStrategy;
  query["HostGroupIdList"] = request.hostGroupIdList;
  query["HostIdList"] = request.hostIdList;
  query["Interval"] = request.interval;
  query["IsRolling"] = request.isRolling;
  query["NodeCountPerBatch"] = request.nodeCountPerBatch;
  query["OnlyRestartStaleConfigNodes"] = request.onlyRestartStaleConfigNodes;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ServiceActionName"] = request.serviceActionName;
  query["ServiceName"] = request.serviceName;
  query["TotlerateFailCount"] = request.totlerateFailCount;
  query["TurnOnMaintenanceMode"] = request.turnOnMaintenanceMode;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RunClusterServiceAction',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function runClusterServiceAction(request: RunClusterServiceActionRequest): RunClusterServiceActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return runClusterServiceActionWithOptions(request, runtime);
}

model RunDiskOpsActivityRequest {
  clusterId?: string(name='ClusterId'),
  currentStage?: string(name='CurrentStage'),
  currentState?: string(name='CurrentState'),
  diskId?: string(name='DiskId'),
  eventId?: string(name='EventId'),
  instanceId?: string(name='InstanceId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RunDiskOpsActivityResponseBody = {
  activityState?: string(name='ActivityState'),
  clusterType?: string(name='ClusterType'),
  currentActivity?: string(name='CurrentActivity'),
  errorMessage?: string(name='ErrorMessage'),
  needReboot?: boolean(name='NeedReboot'),
  requestId?: string(name='RequestId'),
}

model RunDiskOpsActivityResponse = {
  headers: map[string]string(name='headers'),
  body: RunDiskOpsActivityResponseBody(name='body'),
}

async function runDiskOpsActivityWithOptions(request: RunDiskOpsActivityRequest, runtime: Util.RuntimeOptions): RunDiskOpsActivityResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["CurrentStage"] = request.currentStage;
  query["CurrentState"] = request.currentState;
  query["DiskId"] = request.diskId;
  query["EventId"] = request.eventId;
  query["InstanceId"] = request.instanceId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RunDiskOpsActivity',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function runDiskOpsActivity(request: RunDiskOpsActivityRequest): RunDiskOpsActivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return runDiskOpsActivityWithOptions(request, runtime);
}

model RunExecutionPlanRequest {
  arguments?: map[string]any(name='Arguments'),
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RunExecutionPlanShrinkRequest {
  argumentsShrink?: string(name='Arguments'),
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RunExecutionPlanResponseBody = {
  executionPlanInstanceId?: string(name='ExecutionPlanInstanceId'),
  requestId?: string(name='RequestId'),
}

model RunExecutionPlanResponse = {
  headers: map[string]string(name='headers'),
  body: RunExecutionPlanResponseBody(name='body'),
}

async function runExecutionPlanWithOptions(tmpReq: RunExecutionPlanRequest, runtime: Util.RuntimeOptions): RunExecutionPlanResponse {
  Util.validateModel(tmpReq);
  var request = new RunExecutionPlanShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.arguments)) {
    request.argumentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.arguments, 'Arguments', 'json');
  }
  var query = {};
  query["Arguments"] = request.argumentsShrink;
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RunExecutionPlan',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function runExecutionPlan(request: RunExecutionPlanRequest): RunExecutionPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return runExecutionPlanWithOptions(request, runtime);
}

model RunScalingActionV2Request {
  actionParam?: string(name='ActionParam'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingActionType?: string(name='ScalingActionType'),
  scalingGroupBizId?: string(name='ScalingGroupBizId'),
}

model RunScalingActionV2ResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model RunScalingActionV2Response = {
  headers: map[string]string(name='headers'),
  body: RunScalingActionV2ResponseBody(name='body'),
}

async function runScalingActionV2WithOptions(request: RunScalingActionV2Request, runtime: Util.RuntimeOptions): RunScalingActionV2Response {
  Util.validateModel(request);
  var query = {};
  query["ActionParam"] = request.actionParam;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ScalingActionType"] = request.scalingActionType;
  query["ScalingGroupBizId"] = request.scalingGroupBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'RunScalingActionV2',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function runScalingActionV2(request: RunScalingActionV2Request): RunScalingActionV2Response {
  var runtime = new Util.RuntimeOptions{};
  return runScalingActionV2WithOptions(request, runtime);
}

model SearchLogRequest {
  clusterId?: string(name='ClusterId'),
  fromTimestamp?: int32(name='FromTimestamp'),
  hostInnerIp?: string(name='HostInnerIp'),
  hostName?: string(name='HostName'),
  line?: int32(name='Line'),
  logstoreName?: string(name='LogstoreName'),
  offset?: int32(name='Offset'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  reverse?: boolean(name='Reverse'),
  slsQueryString?: string(name='SlsQueryString'),
  toTimestamp?: int32(name='ToTimestamp'),
}

model SearchLogResponseBody = {
  completed?: boolean(name='Completed'),
  requestId?: string(name='RequestId'),
  slsLogItemList?: {
    slsLogItem?: [ 
    {
      content?: string(name='Content'),
      hostName?: string(name='HostName'),
      packId?: string(name='PackId'),
      packMeta?: string(name='PackMeta'),
      path?: string(name='Path'),
      sourceIp?: string(name='SourceIp'),
      timestamp?: int32(name='Timestamp'),
    }
  ](name='SlsLogItem')
  }(name='SlsLogItemList'),
}

model SearchLogResponse = {
  headers: map[string]string(name='headers'),
  body: SearchLogResponseBody(name='body'),
}

async function searchLogWithOptions(request: SearchLogRequest, runtime: Util.RuntimeOptions): SearchLogResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["FromTimestamp"] = request.fromTimestamp;
  query["HostInnerIp"] = request.hostInnerIp;
  query["HostName"] = request.hostName;
  query["Line"] = request.line;
  query["LogstoreName"] = request.logstoreName;
  query["Offset"] = request.offset;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Reverse"] = request.reverse;
  query["SlsQueryString"] = request.slsQueryString;
  query["ToTimestamp"] = request.toTimestamp;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SearchLog',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchLog(request: SearchLogRequest): SearchLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchLogWithOptions(request, runtime);
}

model StartFlowRequest {
  flowInstanceId?: string(name='FlowInstanceId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model StartFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model StartFlowResponse = {
  headers: map[string]string(name='headers'),
  body: StartFlowResponseBody(name='body'),
}

async function startFlowWithOptions(request: StartFlowRequest, runtime: Util.RuntimeOptions): StartFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["FlowInstanceId"] = request.flowInstanceId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'StartFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startFlow(request: StartFlowRequest): StartFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return startFlowWithOptions(request, runtime);
}

model SubmitFlowRequest {
  conf?: string(name='Conf'),
  flowId?: string(name='FlowId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model SubmitFlowResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model SubmitFlowResponse = {
  headers: map[string]string(name='headers'),
  body: SubmitFlowResponseBody(name='body'),
}

async function submitFlowWithOptions(request: SubmitFlowRequest, runtime: Util.RuntimeOptions): SubmitFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["Conf"] = request.conf;
  query["FlowId"] = request.flowId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SubmitFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitFlow(request: SubmitFlowRequest): SubmitFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitFlowWithOptions(request, runtime);
}

model SubmitFlowJobRequest {
  clusterId?: string(name='ClusterId'),
  conf?: string(name='Conf'),
  hostName?: string(name='HostName'),
  jobId?: string(name='JobId'),
  jobInstanceId?: string(name='JobInstanceId'),
  namespace?: string(name='Namespace'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model SubmitFlowJobResponseBody = {
  id?: string(name='Id'),
  requestId?: string(name='RequestId'),
}

model SubmitFlowJobResponse = {
  headers: map[string]string(name='headers'),
  body: SubmitFlowJobResponseBody(name='body'),
}

async function submitFlowJobWithOptions(request: SubmitFlowJobRequest, runtime: Util.RuntimeOptions): SubmitFlowJobResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterId"] = request.clusterId;
  query["Conf"] = request.conf;
  query["HostName"] = request.hostName;
  query["JobId"] = request.jobId;
  query["JobInstanceId"] = request.jobInstanceId;
  query["Namespace"] = request.namespace;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SubmitFlowJob',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitFlowJob(request: SubmitFlowJobRequest): SubmitFlowJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitFlowJobWithOptions(request, runtime);
}

model SuspendExecutionPlanSchedulerRequest {
  id?: string(name='Id'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SuspendExecutionPlanSchedulerResponseBody = {
  requestId?: string(name='RequestId'),
}

model SuspendExecutionPlanSchedulerResponse = {
  headers: map[string]string(name='headers'),
  body: SuspendExecutionPlanSchedulerResponseBody(name='body'),
}

async function suspendExecutionPlanSchedulerWithOptions(request: SuspendExecutionPlanSchedulerRequest, runtime: Util.RuntimeOptions): SuspendExecutionPlanSchedulerResponse {
  Util.validateModel(request);
  var query = {};
  query["Id"] = request.id;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SuspendExecutionPlanScheduler',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function suspendExecutionPlanScheduler(request: SuspendExecutionPlanSchedulerRequest): SuspendExecutionPlanSchedulerResponse {
  var runtime = new Util.RuntimeOptions{};
  return suspendExecutionPlanSchedulerWithOptions(request, runtime);
}

model SuspendFlowRequest {
  flowInstanceId?: string(name='FlowInstanceId'),
  projectId?: string(name='ProjectId'),
  regionId?: string(name='RegionId'),
}

model SuspendFlowResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model SuspendFlowResponse = {
  headers: map[string]string(name='headers'),
  body: SuspendFlowResponseBody(name='body'),
}

async function suspendFlowWithOptions(request: SuspendFlowRequest, runtime: Util.RuntimeOptions): SuspendFlowResponse {
  Util.validateModel(request);
  var query = {};
  query["FlowInstanceId"] = request.flowInstanceId;
  query["ProjectId"] = request.projectId;
  query["RegionId"] = request.regionId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'SuspendFlow',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function suspendFlow(request: SuspendFlowRequest): SuspendFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return suspendFlowWithOptions(request, runtime);
}

model TagResourcesRequest {
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model TagResourcesResponse = {
  headers: map[string]string(name='headers'),
  body: TagResourcesResponseBody(name='body'),
}

async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceId"] = request.resourceId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  query["Tag"] = request.tag;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UninstallLibrariesRequest {
  clusterBizIdList?: [ string ](name='ClusterBizIdList'),
  libraryBizId?: string(name='LibraryBizId'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model UninstallLibrariesResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UninstallLibrariesResponse = {
  headers: map[string]string(name='headers'),
  body: UninstallLibrariesResponseBody(name='body'),
}

async function uninstallLibrariesWithOptions(request: UninstallLibrariesRequest, runtime: Util.RuntimeOptions): UninstallLibrariesResponse {
  Util.validateModel(request);
  var query = {};
  query["ClusterBizIdList"] = request.clusterBizIdList;
  query["LibraryBizId"] = request.libraryBizId;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UninstallLibraries',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uninstallLibraries(request: UninstallLibrariesRequest): UninstallLibrariesResponse {
  var runtime = new Util.RuntimeOptions{};
  return uninstallLibrariesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All'),
  regionId?: string(name='RegionId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType'),
  tagKey?: [ string ](name='TagKey'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model UntagResourcesResponse = {
  headers: map[string]string(name='headers'),
  body: UntagResourcesResponseBody(name='body'),
}

async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  query["All"] = request.all;
  query["RegionId"] = request.regionId;
  query["ResourceId"] = request.resourceId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["ResourceType"] = request.resourceType;
  query["TagKey"] = request.tagKey;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UpdateDataSourceRequest {
  conf?: string(name='Conf'),
  description?: string(name='Description'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model UpdateDataSourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateDataSourceResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateDataSourceResponseBody(name='body'),
}

async function updateDataSourceWithOptions(request: UpdateDataSourceRequest, runtime: Util.RuntimeOptions): UpdateDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  query["Conf"] = request.conf;
  query["Description"] = request.description;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceGroupId"] = request.resourceGroupId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDataSource',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDataSource(request: UpdateDataSourceRequest): UpdateDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataSourceWithOptions(request, runtime);
}

model UpdateLibraryInstallTaskStatusRequest {
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: string(name='Status'),
  taskBizId?: string(name='TaskBizId'),
}

model UpdateLibraryInstallTaskStatusResponseBody = {
  data?: boolean(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateLibraryInstallTaskStatusResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateLibraryInstallTaskStatusResponseBody(name='body'),
}

async function updateLibraryInstallTaskStatusWithOptions(request: UpdateLibraryInstallTaskStatusRequest, runtime: Util.RuntimeOptions): UpdateLibraryInstallTaskStatusResponse {
  Util.validateModel(request);
  var query = {};
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["Status"] = request.status;
  query["TaskBizId"] = request.taskBizId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLibraryInstallTaskStatus',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLibraryInstallTaskStatus(request: UpdateLibraryInstallTaskStatusRequest): UpdateLibraryInstallTaskStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLibraryInstallTaskStatusWithOptions(request, runtime);
}

model UpdateTagRequest {
  category?: string(name='Category'),
  description?: string(name='Description'),
  id?: long(name='Id'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model UpdateTagResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model UpdateTagResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateTagResponseBody(name='body'),
}

async function updateTagWithOptions(request: UpdateTagRequest, runtime: Util.RuntimeOptions): UpdateTagResponse {
  Util.validateModel(request);
  var query = {};
  query["Category"] = request.category;
  query["Description"] = request.description;
  query["Id"] = request.id;
  query["Name"] = request.name;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTag',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateTag(request: UpdateTagRequest): UpdateTagResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateTagWithOptions(request, runtime);
}

model UpdateUserRequest {
  aliyunUserId?: string(name='AliyunUserId'),
  description?: string(name='Description'),
  groupIdList?: [ integer ](name='GroupIdList'),
  regionId?: string(name='RegionId'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  roleIdList?: [ integer ](name='RoleIdList'),
  status?: string(name='Status'),
  userAccountParamList?: [ 
    {
      accountPassword?: string(name='AccountPassword'),
      accountType?: string(name='AccountType'),
      authType?: string(name='AuthType'),
    }
  ](name='UserAccountParamList'),
  userName?: string(name='UserName'),
  userType?: string(name='UserType'),
}

model UpdateUserResponseBody = {
  data?: boolean(name='Data'),
  paging?: boolean(name='Paging'),
  requestId?: string(name='RequestId'),
}

model UpdateUserResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateUserResponseBody(name='body'),
}

async function updateUserWithOptions(request: UpdateUserRequest, runtime: Util.RuntimeOptions): UpdateUserResponse {
  Util.validateModel(request);
  var query = {};
  query["AliyunUserId"] = request.aliyunUserId;
  query["Description"] = request.description;
  query["GroupIdList"] = request.groupIdList;
  query["RegionId"] = request.regionId;
  query["ResourceOwnerId"] = request.resourceOwnerId;
  query["RoleIdList"] = request.roleIdList;
  query["Status"] = request.status;
  query["UserAccountParamList"] = request.userAccountParamList;
  query["UserName"] = request.userName;
  query["UserType"] = request.userType;
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = Util.toMap(request),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUser',
    version = '2016-04-08',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateUser(request: UpdateUserRequest): UpdateUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserWithOptions(request, runtime);
}

